Thursday, February 3, 2011

Visual Studio 2010 and FxCop Integration

Visual Studio 2010 Premium and Ultimate Editions already have FxCop installed by default under the Code Analysis section in the Build menu option, see snapshot below:


You can configure your own Rules by right clicking on your Project -> Properties -> Code Analysis -> Set the Rule Set option as shown in the snapshot below:


To run the Code Analysis section, right click on your Project -> Run Code Analysis as shown in the snapshot below:


You will see the Code Analysis Results in the Error List window as shown in the snapshot below:
(Check for both Errors and Warnings and fix them)


I hope this helps.