質問

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