Creating TeamCity FxCop build step leads to build failure if the rule is violated

I have two build steps in my build configuration: a Visual Studio build runner (sln), and then an FxCop build runner. I am using TeamCity 6.0.1 and FxCop 10.0.

Out of the box, the FxCop runner in TeamCity seems to report only violations of the rules and displays a report on the Code Verification tab. I want to guarantee that if any violation occurs, that the build step will fail and therefore lead to the failure of the entire assembly.

Is there any way to do this?

+5
source share
2 answers

FxCop 0. , .

, Warnings limit. , 0. , BreaksBuild == False, .

TeamCity 6.0 ( 15772) FxCop 10.0.

[14:39:22]: [Step 2/2] Importing inspection results
[14:39:22]: [Step 2/2] Errors limit reached: found 8 errors, limit 0
[14:39:22]: [Step 2/2] ##teamcity[buildStatus status='FAILURE' text='Errors: 8, warnings: 1']
+2

7.0 EAP " " " " = > " " = > " ", . " , 30"

0

All Articles