-
-
Notifications
You must be signed in to change notification settings - Fork 934
/
Directory.Build.props
53 lines (47 loc) · 1.77 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
<Project>
<Import Project="$(MSBuildThisFileFullPath).user" Condition="Exists('$(MSBuildThisFileFullPath).user')" />
<!--
Assembly Info properties that apply to all projects/assemblies.
-->
<PropertyGroup>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Renci.SshNet.snk</AssemblyOriginatorKeyFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<WarningLevel>9999</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!--
Code analysis properties.
-->
<PropertyGroup>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>preview-All</AnalysisLevel>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<!-- don't treat NuGet Audit warnings as errors -->
<PropertyGroup>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
</PropertyGroup>
<!--
Disable nullable warnings on old frameworks because of missing annotations.
-->
<PropertyGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) ">
<NoWarn>$(NoWarn);CS8602;CS8604;CS8777</NoWarn>
</PropertyGroup>
<!--
Add the stylecop config to each project.
-->
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" Visible="false" />
</ItemGroup>
<!--
Use fixed version of analyzers.
-->
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
<PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
<PackageReference Include="SonarAnalyzer.CSharp" PrivateAssets="all" />
</ItemGroup>
</Project>