|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Run Code Analysis
The code analysis tool provides information to you about possible defects in your source code.
To run code analysis by using the Project menu
On the Project menu, click <project name> Properties, and then select Code Analysis tab.
Select Enable Code Analysis on Build (defines CODE_ANALYSIS constant).
To run code analysis by using the Build or the Analyze menus
On either the Build or the Analyze menu, click Run Code Analysis on <project name>.
To run code analysis from Solution Explorer
In Solution Explorer, right-click the project name, and then click Properties.
Select the Code Analysis tab, and then select Enable Code Analysis on Build (defines CODE_ANALYSIS constant).