VS2019 打开一个解决方案总是进行 StyleCop 代码风格检查

2020-05-11 18:32发布

问题:

遇到一个奇怪问题,有一个解决方案,并没有配置 StyleCop 也没有安装相关的 nuget 包,但 Visual Studio 2019 总是对代码进行风格检查,结果显示一堆波浪线,请问如何解决这个问题?

回答1:

终于找到了解决方法,在 .csproj 中添加下面的配置

<RunAnalyzers>false</RunAnalyzers>

或者 disable source code analysis for managed code

To open this page, right-click on the project node in Solution Explorer and select Properties. Select the Code Analysis tab.
To disable live source analysis, uncheck the Run on live analysis option.



回答2:

重装一个吧



回答3:

建议使用VS 2017 。。。



回答4:

dalao有空没,帮我看看我博问上最新的问题可以不