Custom Rule Sets for Analyzers

Christoph Wille edited this page Jul 22, 2015 · 7 revisions

Whether you are using the VSIX or the NuGet, you can configure which analyzer should be active, and what action it effects. The simplest way is to go to the References / Open Active Rule Set context menu command (don't be deterred when the Analyzers node is empty):

Open Active Rule Set

This will allow you to configure the rule set (if it is not one of the built-in ones, please see the References section on this page):

Editing a Rule Set

If you want to easily apply a pre-defined rule set, go to Project / Properties / Code Analysis. There, you can define new rule sets based on existing ones, or select one you already defined (can be checked in too with your projects). This is also the best way to define corporate rule sets or your personal "global" rule set that you want to use on all your projects.

Assigning a Rule Set

Reference