简体   繁体   English

如何在 Visual Studio 中解决“CA0001:运行代码分析时出现未知错误”

[英]How to resolve “CA0001 : unknown error while running code analysis” in visual studio

while building solution i got error在构建解决方案时出现错误

CA0001: An unknown error occurred while running Code Analysis CA0001:运行代码分析时发生未知错误

error does not show the file name,line number or project name.错误未显示文件名、行号或项目名称。 I don't understand why this error is showing or how to resolve it.我不明白为什么会显示此错误或如何解决它。

I changed Rule set in code analysis and this issue got fixed.我在代码分析中更改了规则集,这个问题得到了解决。 I changed the rule to Microsoft managed recommended rules previous rule was Microsoft all rules.我将规则更改为Microsoft 管理的推荐规则,以前的规则是 Microsoft 所有规则。 I don't know what happened but this is just a work around我不知道发生了什么,但这只是一个解决方法
EDIT project -> project properties -> Code Analysis -> Configure rule set we can change rule set from here编辑项目 -> 项目属性 -> 代码分析 -> 配置规则集我们可以从这里更改规则集

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM