User Guide
67
Component Rules
• To copy the rule set, click Copy, type the new name on the Enter Rule Set Name
dialog, and click OK.
• To modify the rule set, click Modify. The Customize Component Rules dialog
appears, where you can add, edit, and delete rules. For details, see Adding and
Editing Component Rules on page 67.
Note
If you selected a predefined rule set, all the buttons on the Customize Components
Rules dialog are disabled because the predefined rule sets are read-only. However,
you can use this dialog to view the rules in a predefined rule set.
• To rename the rule set, click Rename, type the new name on the Enter Rule Set
Name dialog, and click OK.
• To delete the rule set, click the Delete button to the right of the rule set name.
3. Click OK in the Customize Component Rules dialog.
Adding and Editing Component Rules
You can add component rules to a rule set, edit existing component rules, and delete
component rules.
The predefined rule sets, Microsoft Best Practices and One file per component, are read-
only and cannot be modified.
Caution
If you are sharing component rules, when you edit existing rule sets your changes will
overwrite rule sets used by other members of your team.
To edit a component rule:
1. Select Component Rules menu > Customize. (In Visual Studio: Project menu >
Component Rules > Customize.)
The Component Rules Manager dialog appears, listing the predefined rule sets and
any custom rule sets you have created.
2. Click a rule set and click Modify.
The Customize Component Rules dialog appears.
• To add a rule, click Add. This starts the Component Rule Wizard, which lets you
define component rules. For details, see the procedure below.
• To edit a rule, click the rule in the rules list and click Details. This starts the
Component Rule Wizard, which you can step through to change the rule name or
change any of the conditions or actions. For details, see the procedure below.
3. When you finish, click OK on the Customize Component Rules dialog.
The Component Rules Manager dialog reappears.
4. Click OK.
To add or edit a component rule:
1. On the Name dialog of the Component Rule Wizard, enter a name for the new rule
and click Next. If this is an existing rule, the name is already entered and you can
accept or change it.
The Conditions dialog appears.