2
0

Directory.Build.props 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <Project>
  2. <Import Project="$(MSBuildThisFileFullPath).user" Condition="Exists('$(MSBuildThisFileFullPath).user')" />
  3. <!--
  4. Assembly Info properties that apply to all projects/assemblies.
  5. -->
  6. <PropertyGroup>
  7. <IsPackable>false</IsPackable>
  8. <SignAssembly>true</SignAssembly>
  9. <AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Renci.SshNet.snk</AssemblyOriginatorKeyFile>
  10. <GenerateDocumentationFile>true</GenerateDocumentationFile>
  11. <LangVersion>latest</LangVersion>
  12. <WarningLevel>9999</WarningLevel>
  13. <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  14. </PropertyGroup>
  15. <!--
  16. Code analysis properties.
  17. -->
  18. <PropertyGroup>
  19. <EnableNETAnalyzers>true</EnableNETAnalyzers>
  20. <AnalysisLevel>preview-All</AnalysisLevel>
  21. <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
  22. </PropertyGroup>
  23. <!-- don't treat NuGet Audit warnings as errors -->
  24. <PropertyGroup>
  25. <WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904</WarningsNotAsErrors>
  26. </PropertyGroup>
  27. <!--
  28. Disable nullable warnings on old frameworks because of missing annotations.
  29. -->
  30. <PropertyGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) ">
  31. <NoWarn>$(NoWarn);CS8602;CS8604;CS8777</NoWarn>
  32. </PropertyGroup>
  33. <!--
  34. Add the stylecop config to each project.
  35. -->
  36. <ItemGroup>
  37. <AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" Visible="false" />
  38. </ItemGroup>
  39. <!--
  40. Use fixed version of analyzers.
  41. -->
  42. <ItemGroup>
  43. <PackageReference Include="StyleCop.Analyzers" PrivateAssets="all" />
  44. <PackageReference Include="Meziantou.Analyzer" PrivateAssets="all" />
  45. <PackageReference Include="SonarAnalyzer.CSharp" PrivateAssets="all" />
  46. </ItemGroup>
  47. </Project>