如何禁用所有Roslyn代码分析器? [英] How do I disable all Roslyn Code Analyzers?

查看:189
本文介绍了如何禁用所有Roslyn代码分析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试处理一个大型的开源项目,该项目具有少量的Roslyn代码分析器.当我打开解决方案时,Visual Studio使用约35%的CPU约15分钟.使用PerfView,我发现解决方案上运行的代码分析器使Visual Studio陷入困境.

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. Using PerfView I've figured out that the code analyzers being run on the solution are bogging down Visual Studio.

我知道有可能在每个项目的基础上禁用分析器,但是此解决方案包含100多个项目,因此我不想一个接一个地进行.

I know it's possible to disable analyzers on a per-project basis but this solution contains over 100 projects so I'd rather not do this one-by-one.

我的问题:

  • 我可以为给定的解决方案禁用所有Roslyn分析仪以避免这种情况吗?
  • 我可以为Visual Studio中的所有解决方案禁用所有Roslyn Analyzers吗?

推荐答案

尝试Tools/Options/Text Editor/C#/Advanced并禁用完整的解决方案分析.自VS2015 Update 2起才可用.

Try Tools/Options/Text Editor/C#/Advanced and disable full solution analysis. It's only available since VS2015 Update 2.

这篇关于如何禁用所有Roslyn代码分析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆