-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Build.props
30 lines (25 loc) · 1.17 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
<!-- Share build properties and packages with all projects -->
<Project>
<PropertyGroup>
<!-- Build-related Properties -->
<!-- Generate XML documentation of code from code comments -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- C# Compiler Options -->
<Nullable>enable</Nullable>
<!-- Generated File Properties -->
<ImplicitUsings>enable</ImplicitUsings>
<!-- Code Analysis Properties -->
<!-- Set the code analysis level to the latest recommended analyzers that have been released -->
<AnalysisLevel>latest-recommended</AnalysisLevel>
<!-- Enable code style analysis diagnostics for .NET projects to be reported on a build -->
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- Do not allow warnings in a release build. Leave them as is during debug builds for developer sanity. -->
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!-- Commands to run before builds -->
<Target Name="Prebuild Actions" BeforeTargets="PreBuildEvent">
<Exec Command="dotnet tool restore"/>
</Target>
</Project>