forked from nunit/nunit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
94 lines (84 loc) · 4.06 KB
/
Directory.Build.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<Project>
<PropertyGroup>
<LangVersion Condition="'$(MSBuildProjectExtension)' == '.csproj'">11</LangVersion>
<Features>strict</Features>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\nunit.snk</AssemblyOriginatorKeyFile>
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<NUnitLibraryFrameworks>net462;net6.0</NUnitLibraryFrameworks>
<NUnitRuntimeFrameworks>net462;net6.0;net8.0</NUnitRuntimeFrameworks>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<!--<OutputPath>..\..\..\bin\$(Configuration)\</OutputPath>-->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<Nullable>enable</Nullable>
<AnnotatedReferenceAssemblyVersion>7.0.0</AnnotatedReferenceAssemblyVersion>
<GenerateNullableAttributes>false</GenerateNullableAttributes>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<Company>NUnit Software</Company>
<Product>NUnit 4</Product>
<Version Condition="'$(Version)'==''">4.0.0.0</Version>
<Copyright>Copyright (c) Charlie Poole, Rob Prouse and Contributors. MIT License - see LICENSE.txt</Copyright>
<Trademark>NUnit is a trademark of NUnit Software</Trademark>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildingInsideVisualStudio)' != 'true'">
<!-- Ideally this is always enabled, but that tends to hurt developer productivity -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="$(TargetFramework.StartsWith('net4'))">$(DefineConstants);THREAD_ABORT</DefineConstants>
</PropertyGroup>
<!-- We always want a good debugging experience in tests -->
<PropertyGroup>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<Choose>
<When Condition="'$(TargetFramework)' == 'net462'">
<PropertyGroup>
<AssemblyConfiguration>.NET Framework 4.6.2 $(Configuration)</AssemblyConfiguration>
</PropertyGroup>
</When>
<When Condition="$(TargetFramework.StartsWith('net6.0'))">
<PropertyGroup>
<AssemblyConfiguration>.NET 6.0 $(Configuration)</AssemblyConfiguration>
</PropertyGroup>
</When>
<When Condition="$(TargetFramework.StartsWith('net8.0'))">
<PropertyGroup>
<AssemblyConfiguration>.NET 8.0 $(Configuration)</AssemblyConfiguration>
</PropertyGroup>
</When>
<When Condition="$(TargetFramework.StartsWith('net9.0'))">
<PropertyGroup>
<AssemblyConfiguration>.NET 9.0 $(Configuration)</AssemblyConfiguration>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyConfiguration />
</PropertyGroup>
</Otherwise>
</Choose>
<Target Name="CheckConfiguration" BeforeTargets="Compile">
<Error Condition="'$(AssemblyConfiguration)' == ''" Text="Missing AssemblyConfiguration for $(TargetFramework)" />
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" PrivateAssets="all" />
<PackageReference Include="IsExternalInit" PrivateAssets="all" />
<PackageReference Include="Nullable" PrivateAssets="all" />
<PackageReference Include="CSharpIsNullAnalyzer" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)/StyleCop.Analyzers.globalconfig" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[$(AnnotatedReferenceAssemblyVersion)]" />
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" PrivateAssets="all" />
</ItemGroup>
</Project>