Skip to content

Commit a911e13

Browse files
committed
Moved common C# project properties to a central location. Upgraded C# compiler version.
1 parent 16dfc4b commit a911e13

File tree

7 files changed

+36
-35
lines changed

7 files changed

+36
-35
lines changed

Biohazrd.CSharp/Biohazrd.CSharp.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
5-
<PlatformTarget>x64</PlatformTarget>
6-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
7-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<Nullable>enable</Nullable>
95
</PropertyGroup>
106

117
<ItemGroup>

Biohazrd.OutputGeneration/Biohazrd.OutputGeneration.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
5-
<PlatformTarget>x64</PlatformTarget>
6-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
7-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8-
<Nullable>enable</Nullable>
95
</PropertyGroup>
106

117
<ItemGroup>

Biohazrd.Transformation/Biohazrd.Transformation.csproj

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,10 @@
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
5-
<!--
6-
ClangSharp.Pathogen requires Windows x64 right now
7-
This is also indirectly a workaround for https://github.com/microsoft/ClangSharp/issues/118#issuecomment-598305888
8-
-->
9-
<PlatformTarget>x64</PlatformTarget>
10-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
11-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
12-
<Nullable>enable</Nullable>
135
</PropertyGroup>
146

157
<ItemGroup>
168
<ProjectReference Include="..\Biohazrd\Biohazrd.csproj" />
17-
<!-- Using nighly compiler since the one in the current .NET Preview has outdated codegen for records -->
18-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0-3.20421.1">
19-
<PrivateAssets>all</PrivateAssets>
20-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
21-
</PackageReference>
229
</ItemGroup>
2310

2411
</Project>

Biohazrd/Biohazrd.csproj

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,11 @@
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
5-
<!--
6-
ClangSharp.Pathogen requires Windows x64 right now
7-
This is also indirectly a workaround for https://github.com/microsoft/ClangSharp/issues/118#issuecomment-598305888
8-
-->
9-
<PlatformTarget>x64</PlatformTarget>
10-
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
11-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
12-
<Nullable>enable</Nullable>
135
</PropertyGroup>
146

157
<ItemGroup>
168
<PackageReference Include="ClangSharp" Version="10.0.0-beta" />
179
<PackageReference Include="ClangSharp.Pathogen" Version="0.0.0-ci5" />
18-
<!-- Using nighly compiler since the one in the current .NET Preview has outdated codegen for records -->
19-
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0-3.20421.1">
20-
<PrivateAssets>all</PrivateAssets>
21-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
22-
</PackageReference>
2310
</ItemGroup>
2411

2512
</Project>

ClangSharpTest2020.sln

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A8649210-1355-403A-8B2D-45BD759B1B32}"
99
ProjectSection(SolutionItems) = preProject
1010
.editorconfig = .editorconfig
11+
Directory.Build.props = Directory.Build.props
1112
NuGet.config = NuGet.config
1213
EndProjectSection
1314
EndProject
@@ -17,7 +18,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.CSharp", "Biohazrd
1718
EndProject
1819
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.Transformation", "Biohazrd.Transformation\Biohazrd.Transformation.csproj", "{70E3CA1B-6851-4029-BFD4-81AE0D7A9509}"
1920
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Biohazrd.OutputGeneration", "Biohazrd.OutputGeneration\Biohazrd.OutputGeneration.csproj", "{22921290-4487-417A-9BAA-D25A1840A554}"
21+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Biohazrd.OutputGeneration", "Biohazrd.OutputGeneration\Biohazrd.OutputGeneration.csproj", "{22921290-4487-417A-9BAA-D25A1840A554}"
22+
EndProject
23+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tooling", "tooling", "{09A8B262-0D6C-43DA-A39D-7EFF5E12ECA6}"
24+
ProjectSection(SolutionItems) = preProject
25+
tooling\Common.csproj.props = tooling\Common.csproj.props
26+
EndProjectSection
2127
EndProject
2228
Global
2329
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -49,6 +55,9 @@ Global
4955
GlobalSection(SolutionProperties) = preSolution
5056
HideSolutionNode = FALSE
5157
EndGlobalSection
58+
GlobalSection(NestedProjects) = preSolution
59+
{09A8B262-0D6C-43DA-A39D-7EFF5E12ECA6} = {A8649210-1355-403A-8B2D-45BD759B1B32}
60+
EndGlobalSection
5261
GlobalSection(ExtensibilityGlobals) = postSolution
5362
SolutionGuid = {48868128-E026-4C69-969F-8D1EE05B66F5}
5463
EndGlobalSection

Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<Import Project="tooling/Common$(MSBuildProjectExtension).props" Condition="Exists('tooling/Common$(MSBuildProjectExtension).props')"/>
3+
</Project>

tooling/Common.csproj.props

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Common C# Properties -->
4+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5+
<Features>strict</Features>
6+
<Nullable>enable</Nullable>
7+
<LangVersion>preview</LangVersion>
8+
9+
<!--
10+
ClangSharp.Pathogen requires Windows x64 right now
11+
This is also indirectly a workaround for https://github.com/microsoft/ClangSharp/issues/118#issuecomment-598305888
12+
-->
13+
<PlatformTarget>x64</PlatformTarget>
14+
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
15+
</PropertyGroup>
16+
<ItemGroup>
17+
<!-- Using nighly compiler since the one in the current .NET Preview has outdated codegen for records -->
18+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0-4.20460.4">
19+
<PrivateAssets>all</PrivateAssets>
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
21+
</PackageReference>
22+
</ItemGroup>
23+
</Project>

0 commit comments

Comments
 (0)