-
Notifications
You must be signed in to change notification settings - Fork 1
/
Directory.Build.props
77 lines (64 loc) · 4.23 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
<Project>
<Import Project="$(MSBuildThisFileDirectory)Product.props" />
<PropertyGroup>
<!-- Sign assemblies with accompanying key -->
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Key.snk</AssemblyOriginatorKeyFile>
<SignAssemblyPublicKey>0024000004800000940000000602000000240000525341310004000001000100E95F35153D14B61317D9C6BDB72C8FFC2B5BF2E71A3A5061184E44F61901823E38A1F566500A21BD2B12A0ADD818EA40113C5E24555E82DF156BDCB3342B37116FECF2A2916E9061431882C6A3125E00235F156E8FD3A223A71EA03D2E476C64B0B365015FA21DFF9880B246856BE5451B4ACACC6D66A0B3CE1B890679BD07E6</SignAssemblyPublicKey>
<!-- Place obj and bin directories for build in the root directory above src -->
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)\obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<BaseOutputPath>$(MSBuildThisFileDirectory)\bin\Projects\$(MSBuildProjectName)\</BaseOutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<!-- Set warning level to value '5' and treat compile warnings as errors-->
<WarningLevel>5</WarningLevel>
<!-- <TreatWarningsAsErrors>true</TreatWarningsAsErrors> -->
<!-- Set analysis level to value 'latest', enable all rules and treat warnings as errors -->
<!-- <AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors> -->
<!-- Set C# language version 10.0 -->
<LangVersion>10.0</LangVersion>
<!-- By default no project is packable but can be overridden if needed -->
<IsPackable>false</IsPackable>
<!-- Create snupkg packages -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- ATTENTION: This settings must currently be not used because of implicit build - https://github.com/dotnet/sdk/issues/10335 -->
<!-- Automatically generate nupkg on build to ensure pack will run with current state -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<!-- Test projects are named "[Project under test].Test" and automatically reference necessary dependencies -->
<IsTestProject>$(MSBuildProjectName.EndsWith('.Tests'))</IsTestProject>
</PropertyGroup>
<!-- Enable git versioning via accompanying version.json -->
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Enable access to internal variables to accompanying "[Project under test].Tests" project with implicit InternalsVisibleTo attribute -->
<ItemGroup Condition="!$(IsTestProject)">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>$(AssemblyName).Tests, PublicKey=$(SignAssemblyPublicKey)</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>BaSta.Tests, PublicKey=$(SignAssemblyPublicKey)</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<!-- Set coverage output directory and format for test projects -->
<PropertyGroup Condition="$(IsTestProject) AND '$(CollectCoverage)' == 'true'">
<CoverletOutput Condition="'$(CoverletOutputDir)' != '' AND '$(CoverletOutput)' == ''">$(CoverletOutputDir)/$(MSBuildProjectName).xml</CoverletOutput>
<CoverletOutputFormat Condition="'$(CoverletOutputFormat)' == ''">cobertura</CoverletOutputFormat>
</PropertyGroup>
<!-- Test projects automatically reference necessary dependencies -->
<ItemGroup Condition="$(IsTestProject)">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>