Repository navigation
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
54 lines (46 loc) · 2.37 KB
/
Copy pathDirectory.Build.props
File metadata and controls
54 lines (46 loc) · 2.37 KB
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
<Project>
<!-- Shared build configuration for all projects -->
<PropertyGroup>
<!-- Centralized versioning -->
<Version>0.1.1</Version>
<PackageVersion>$(Version)</PackageVersion>
<AssemblyVersion Condition="'$(AssemblyVersion)' == ''">$(Version).0</AssemblyVersion>
<FileVersion Condition="'$(FileVersion)' == ''">$(Version).0</FileVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Only provide default TFMs for packable projects when the project has not set TargetFramework/TargetFrameworks. -->
<TargetFrameworks Condition="'$(IsPackable)'=='true' and '$(TargetFramework)'=='' and '$(TargetFrameworks)'==''">net8.0;netstandard2.0</TargetFrameworks>
<!-- Language & build basics -->
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Analyzer policy (pinned for stability) -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>8.0-recommended</AnalysisLevel>
<!-- Deterministic builds + docs -->
<Deterministic>true</Deterministic>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)'=='true' or '$(CI)'=='true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<!-- Include Public API baseline files if they exist next to a project. -->
<ItemGroup>
<AdditionalFiles Remove="$(MSBuildProjectDirectory)\PublicAPI.Shipped.txt;$(MSBuildProjectDirectory)\PublicAPI.Unshipped.txt" />
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\PublicAPI.Shipped.txt')">
<AdditionalFiles Include="$(MSBuildProjectDirectory)\PublicAPI.Shipped.txt" />
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\PublicAPI.Unshipped.txt')">
<AdditionalFiles Include="$(MSBuildProjectDirectory)\PublicAPI.Unshipped.txt" />
</ItemGroup>
<!-- Tests: keep warnings as warnings unless a test project opts in -->
<PropertyGroup Condition="'$(IsTestProject)'=='true'">
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>