How do I disable all Roslyn Code Analyzers?

后端 未结 5 551
一生所求
一生所求 2020-12-30 20:25

I\'m trying to work with a large opensource project that has a handful of Roslyn Code Analyzers. When I open the solution Visual Studio uses ~35% CPU for about 15 minutes. U

5条回答
  •  遥遥无期
    2020-12-30 21:20

    You can disable analyzers on a per-project basis.

    To do it, right click on Project>References>Analyzers in the Solution Explorer and hit Open Active Rule Set

    You can disable individual analyzers or entire bundles of analyzers.

    This creates a .ruleset file and modifies the .csproj, which means that you will share this configuration with your team unless you exclude these changes from source control.

    Note: Changes are applied after you close and re-open the solution.


    Changes to the .csproj:

    
      
        Example.ruleset
    

    Example.ruleset file:

    
    
      
        
        
    ...
    

提交回复
热议问题