0

In our project we now have Code Analysis (CA) set per project and this is propagated to the TFS build server. But we would like not to run CA when we build locally, only on the build server.

The thing is, we have one project (SP 2013) which doesn't produce a DLL and this causes CA errors: - CA0052 No targets were selected - Could not load file .... App.dll

We could supress these, but I would like to have CA skip this project on the build server. Is this at all possible?

4

2 回答 2

2

您可以根据您的配置方式,仅将代码分析设置为在“发布”配置上运行。然后设置一个项目,以便“发布”配置不运行 CA。这样,您的开发人员可以在没有 CA 的“调试”下构建,而 TFS 构建在 AsConfigured 的“发布”下运行

于 2014-07-09T15:54:34.903 回答
0

如果您使用的是 UpgradeTempalate,您可以将 RunCodeAnalysis=Never 作为属性传递给您的 SolutionToBuld 项目组。像下面的东西

RunCodeAnalysis=从不

如果您使用的是默认模板,您可以更新它以将其传递给特定的解决方案。

我认为您仍然希望在团队构建之外的构建上运行代码分析。如果没有,更好的解决方案是不设置“在构建时启用代码分析”标志。

于 2014-07-09T16:04:51.337 回答