How to use a single ruleset file for all projects in a solution

  • Step 1
Create the 'CodeAnalysis' folder in the solution root folder. The solution root folder is a folder that stores *.sln file.
  • Step 2
Copy a ruletset file to the 'CodeAnalysis' folder that is created by Step 1.
  • Step 3
Open a solution file with VS2010.
  • Step 4
Open the context menu of a solution and select the [Edit Code Analysis Configuration] menu.
  • Step 5
Select the custom ruleset in the 'Analyze code with Ruleset' combo box.
  • Step 6
Click [Save] button.
  • Step 7
Open the context menu of a solution or a project and select the Code Analysis with FxCop menu.

Note that you have to uncheck 'Override Analyze code with Ruleset' of the code analysis configuration of each project. If this option is checked, FxCop Integrator overrides ruleset setting of the solution configuration.

Last edited Nov 8, 2011 at 10:38 PM by sasaminn, version 3


No comments yet.