From 215de3c0c0886c5b7dd8c661c9fab3e7acceb9c1 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sun, 26 Jan 2020 10:32:18 +1000 Subject: [PATCH] Make Roslyn Analyzers opt-in at compile-time (resolves #1813) They are still run by the IDE at design-time. To opt-in, set the MSBuild property MachineRunAnalyzersDuringBuild. From the command-line, you can do this by adding `/p:MachineRunAnalyzersDuringBuild=true`. --- BizHawk.Common/BizHawk.Common.csproj | 4 ++-- Common.props | 3 ++- Dist/BuildAndPackage.bat | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BizHawk.Common/BizHawk.Common.csproj b/BizHawk.Common/BizHawk.Common.csproj index c561e8640f..f38ed8c627 100644 --- a/BizHawk.Common/BizHawk.Common.csproj +++ b/BizHawk.Common/BizHawk.Common.csproj @@ -8,8 +8,8 @@ - - + diff --git a/Common.props b/Common.props index 32fc3af1e8..e9fb940623 100644 --- a/Common.props +++ b/Common.props @@ -6,6 +6,8 @@ 8.0 $(SolutionDir)output/dll x64 + false + false true @@ -21,6 +23,5 @@ - diff --git a/Dist/BuildAndPackage.bat b/Dist/BuildAndPackage.bat index 81968cf7ea..fee5db752b 100644 --- a/Dist/BuildAndPackage.bat +++ b/Dist/BuildAndPackage.bat @@ -14,7 +14,7 @@ for /f "usebackq tokens=*" %%A in (`vswhere -version "[16.0,17.0)" -requires Mic IF "%MSBUILDPATH%"=="" GOTO MISSINGMSBUILD nuget restore ..\BizHawk.sln -call "%MSBUILDPATH%" ..\BizHawk.sln /p:Configuration=Release /p:Platform="Any Cpu" /t:rebuild +call "%MSBUILDPATH%" ..\BizHawk.sln "/p:Configuration=Release;Platform=AnyCPU;MachineRunAnalyzersDuringBuild=true" /t:rebuild @if errorlevel 1 goto MSBUILDFAILED