开发者

How to create a FxCop (Code Analysis) custom ruleset by combining existing rules

Please let me know , how can I develop a FxCop (Code Analysis) custom rules assembly by combining existing rules such as that custom rules assembly will include rules from "Microsoft Basic Correctness Rules" and "Microsoft Security Rules"

If you can provide r开发者_开发百科eference link or code sample, that would be great.

Thanks

Lasantha


"Microsoft Basic Correctness Rules" and "Microsoft Security Rules" are rule sets, not rule assemblies. Each of these rule sets actually includes rules from more than one assembly. If your intent is to create a custom rules set that combines the two, this can be done quite easily:

  1. Create a new rule set file in Visual Studio.
  2. Open the file in the rule set editor (assuming it's not already open).
  3. Click the "Add or remove child rule sets..." button in the rule set editor toolbar (it's usually the second to last button).
  4. Check the rule sets you want to include then click OK to close the "Add or Remove Rule Sets" dialog.
  5. Save your new rule set.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜