Code Analysis as Warning Locally but Error on TFS Build

I'd like Code Analysis violations to show up as warnings locally (so that devs can still F5 run even if there are CA violations), but as Errors in the TFS Build (more specifically I'd like the build to fail).

I still want to maintain the list of rules I care about in one place though, so I don't want to have to create separate ruleset files for local/TFS.

Any ideas for how I could configure this?


Add a msbuild parameter on the build definition. I thinks its /p:CodeAnalysisTreatWarningsAsErrors=true

链接地址: http://www.djcxy.com/p/69046.html

上一篇: 哪个自定义词典规则用一个数字来处理首字母缩略词?

下一篇: 代码分析在本地警告,但在TFS构建时出错