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).