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?

有帮助吗?

解决方案

There is an undocumented switch in fxcopcmd /rid:

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top