Question

Was using the MSBuild task a while back, and found some documentation about being able to exclude specific rules, e.g. -Microsoft.Design#CA2210. The MSBuild task translates that into /rule:-Microsoft.Design#CA2210.

We are now using the FXCop build runner in TeamCity, and adding that parameter into additional command line parameters is failing:

Failed to load rules file '-Microsoft.Design#CA2210;-Microsoft.Design#CA1020': Unable to find the specified file.

It seems that this argument is to specify the rulesets, and not individual rules. Can this be done?

Was it helpful?

Solution

There is an undocumented switch in fxcopcmd /rid:

You can exclude via: /rid:-Microsoft.Design#CA2210 /rid: etc

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top