Specifying code analysis setting in TFS 2010 build

做~自己de王妃 提交于 2019-12-07 00:14:32

You should be able to use the "MSBuild Arguments" entry in your build process parameters configuration to provide a /property command line entry that will be passed to MSBuild, thereby allowing override of the CodeAnalysisRuleSet property value to be applied.

Depending on how you have set up the CodeAnalysisRuleSet property values in your existing projects, you may also need to tweak the value assignments to be conditional on the pre-existing value being empty. If you need to do this, you might want to consider taking the opportunity to move the code analysis configuration for all projects into a separate .targets file so that they can be tweaked more easily in the future.

Khh

I dont think you can specify a custom code analysis ruleset file if you switch to Always.

(based on Nicole's answer)

I think if you set the action to Always the assigned ruleset file for the current build flavor is used.

Based on this you need to assign the custom ruleset file with VS to your projects like discribed here or via menu->Analyze->Configure Code Analysis for Solution/Projects.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!