0

当我构建项目时,出现以下错误。如何解决这个问题?

错误消息:为了对托管二进制文件执行代码分析,MSBuild 需要启动 FxCop。MSBuild 无法找到 FxCop 二进制文件。确保已安装 Visual Studio Team Edition for Software Developers 或 Visual Studio Team Suite 并从“Visual Studio 命令提示符”中运行 MSBuild</p>

4

2 回答 2

1

Found the answer. In my solution the rule set is in a shared network location like bellow.

<CodeAnalysisRuleSet>\\someserver\aa\bb.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>

If you don't have correct credentials to access the network location you will get this error. So make sure \someserver\aa\bb.ruleset is accessible from your machine. If not go to run and type \\someserver\ and when the login window is prompted enter your credentials. (specially if you are from a another domain, cross domain login can fail). Once you login, the next time visual studio can happily access the network path.

于 2013-10-31T02:11:45.910 回答
0

****编辑***

如果那不是您想要的,这将永久禁用代码分析。不要使用它。

打开项目文件并替换此属性

<RunCodeAnalysis>true</RunCodeAnalysis>

with 

<RunCodeAnalysis>false</RunCodeAnalysis>
于 2013-10-31T01:27:28.283 回答