2
0

Directory.Build.props 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. <!--
  24. Disable nullable warnings on old frameworks because of missing annotations.
  25. -->
  26. <PropertyGroup Condition=" !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0')) ">
  27. <NoWarn>$(NoWarn);CS8602</NoWarn>
  28. </PropertyGroup>
  29. <!--
  30. Add the stylecop config to each project.
  31. -->
  32. <ItemGroup>
  33. <AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" Visible="false" />
  34. </ItemGroup>
  35. <!--
  36. Use fixed version of analyzers.
  37. -->
  38. <ItemGroup>
  39. <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all" />
  40. <PackageReference Include="Meziantou.Analyzer" Version="2.0.141" PrivateAssets="all" />
  41. <PackageReference Include="SonarAnalyzer.CSharp" Version="9.19.0.84025" PrivateAssets="all" />
  42. </ItemGroup>
  43. </Project>