Reputation: 31
I wanted to know how do I disable all roslyn analyzers in entire solution during debug mode but keep them enable in release mode? I can find references to disable them permanently or individually.
Upvotes: 1
Views: 395
Reputation: 1187
Add the following to the .csproj file of your project:
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>
This will disable all analyzers for debug builds, but not for release builds.
Upvotes: 4