Browse Source

Avoid TypeLoadExceptions in VS 2022 (#34664)

- This should be fixed when VS 2022 updates its Microsoft.CodeAnalysis.CSharp dependency
Stephen Halter 4 years ago
parent
commit
70479b5225
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Directory.Build.props

+ 6 - 0
Directory.Build.props

@@ -15,6 +15,12 @@
     <AnalysisMode>Default</AnalysisMode>
   </PropertyGroup>
 
+  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '17.0' ">
+    <RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
+    <RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
+    <RunAnalyzers>false</RunAnalyzers>
+  </PropertyGroup>
+
   <!-- Defines project type conventions. -->
   <PropertyGroup>
     <RepoRelativeProjectDir>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectDirectory)))</RepoRelativeProjectDir>