1- <?xml version =" 1.0" encoding =" utf-8" ?>
2- <Project DefaultTargets =" Build" ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
32 <PropertyGroup >
4- <Configuration Condition =" '$(Configuration)' == '' " >Debug</Configuration >
5- <Platform Condition =" '$(Platform)' == '' " >x86</Platform >
6- <ProjectGuid >{4E5B38F7-4E99-4C92-BB39-9100CC7F3829}</ProjectGuid >
7- <OutputType >Library</OutputType >
8- <RootNamespace >OpenRA.Mods.Example</RootNamespace >
9- <AssemblyName >OpenRA.Mods.Example</AssemblyName >
10- <TargetFrameworkVersion >v4.5</TargetFrameworkVersion >
11- </PropertyGroup >
12- <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Debug|x86'" >
13- <DebugSymbols >true</DebugSymbols >
14- <DebugType >full</DebugType >
15- <DefineConstants >DEBUG;TRACE</DefineConstants >
16- <PlatformTarget >x86</PlatformTarget >
17- <ErrorReport >prompt</ErrorReport >
18- <OutputPath >bin\Debug\</OutputPath >
3+ <TargetFramework >net461</TargetFramework >
194 <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
20- </PropertyGroup >
21- <PropertyGroup Condition =" '$(Configuration)|$(Platform)' == 'Release|x86'" >
22- <DebugSymbols >true</DebugSymbols >
23- <OutputPath >bin\Release\</OutputPath >
24- <DefineConstants >TRACE</DefineConstants >
25- <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
26- <DebugType >pdbonly</DebugType >
27- <PlatformTarget >x86</PlatformTarget >
28- <ErrorReport >prompt</ErrorReport >
295 <Optimize >true</Optimize >
6+ <LangVersion >5</LangVersion >
7+ <DebugSymbols >true</DebugSymbols >
8+ <TreatWarningsAsErrors >true</TreatWarningsAsErrors >
9+ <OutputPath >../mods/example</OutputPath >
10+ <AppendTargetFrameworkToOutputPath >false</AppendTargetFrameworkToOutputPath >
11+ <PlatformTarget >AnyCPU</PlatformTarget >
12+ <EnableDefaultCompileItems >false</EnableDefaultCompileItems >
13+ <CodeAnalysisRuleSet >../engine/OpenRA.ruleset</CodeAnalysisRuleSet >
3014 </PropertyGroup >
3115 <ItemGroup >
32- <Reference Include =" System" />
33- <Reference Include =" System.Core" />
34- <Reference Include =" System.Drawing" />
35- <Reference Include =" Eluant" >
36- <HintPath >..\engine\thirdparty\download\Eluant.dll</HintPath >
37- <Private >False</Private >
38- </Reference >
39- </ItemGroup >
40- <ItemGroup >
41- <Compile Include =" Widgets\Logic\TemplateMenuLogic.cs" />
42- </ItemGroup >
43- <ItemGroup >
44- <Folder Include =" Widgets\" />
45- <Folder Include =" Widgets\Logic\" />
16+ <!-- Work around an issue where Rider does not detect files in the project root using the default glob -->
17+ <Compile Include =" **/*.cs" Exclude =" $(DefaultItemExcludes)" />
4618 </ItemGroup >
19+ <PropertyGroup Condition =" '$(Configuration)'=='Debug'" >
20+ <DefineConstants >DEBUG;TRACE</DefineConstants >
21+ <Optimize >false</Optimize >
22+ </PropertyGroup >
4723 <ItemGroup >
48- <ProjectReference Include =" ..\engine\OpenRA.Mods.Common\OpenRA.Mods.Common.csproj" >
49- <Project >{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}</Project >
50- <Name >OpenRA.Mods.Common</Name >
24+ <Reference Include =" Eluant" >
25+ <HintPath >../engine/thirdparty/download/Eluant.dll</HintPath >
26+ <Private >False</Private >
27+ </Reference >
28+ <ProjectReference Include =" ../engine/OpenRA.Game/OpenRA.Game.csproj" >
5129 <Private >False</Private >
5230 </ProjectReference >
53- <ProjectReference Include =" ..\engine\OpenRA.Game\OpenRA.Game.csproj" >
54- <Project >{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project >
55- <Name >OpenRA.Game</Name >
31+ <ProjectReference Include =" ../engine/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj" >
5632 <Private >False</Private >
5733 </ProjectReference >
34+ <PackageReference Include =" StyleCop.Analyzers" Version =" 1.1.118" />
35+ <AdditionalFiles Include =" ../engine/stylecop.json" />
5836 </ItemGroup >
59- <Import Project =" $(MSBuildBinPath)\Microsoft.CSharp.targets" />
60- <Target Name =" AfterBuild" >
61- <MakeDir Directories =" $(SolutionDir)mods/example/" />
62- <Copy SourceFiles =" $(TargetPath)" DestinationFolder =" $(SolutionDir)mods/example/" />
63- <!--
64- We need to copy OpenRA.Mods.Cnc.pdb (not `.dll.pdb`). This is only necessary on Windows.
65- Mono outputs a `.dll.mdb` so we can just append `.mdb` directly.
66- -->
67- <Copy SourceFiles =" $(TargetDir)$(TargetName).pdb" DestinationFolder =" $(SolutionDir)mods/example/" Condition =" Exists('$(TargetDir)$(TargetName).pdb')" />
68- <Copy SourceFiles =" $(TargetPath).mdb" DestinationFolder =" $(SolutionDir)mods/example/" Condition =" Exists('$(TargetPath).mdb')" />
69- <!-- Uncomment these lines when debugging or adding to this target
70- <Message Text="DEBUG OS: $(OS)"/>
71- <Message Text="DEBUG SolutionDir: $(SolutionDir)"/>
72- <Message Text="DEBUG TargetPath: $(TargetPath)"/>
73- <Message Text="DEBUG TargetDir: $(TargetDir)"/>
74- <Message Text="DEBUG TargetName: $(TargetName)"/>
75- -->
37+ <Target Name =" DisableAnalyzers" BeforeTargets =" CoreCompile" Condition =" '$(Configuration)'=='Release'" >
38+ <!-- Disable code style analysis on Release builds to improve compile-time performance -->
39+ <ItemGroup Condition =" '$(Configuration)'=='Release'" >
40+ <Analyzer Remove =" @(Analyzer)" />
41+ </ItemGroup >
7642 </Target >
7743</Project >
0 commit comments