Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to: Enable and Disable Code Analysis for Managed Code

The code analysis feature for managed code checks assemblies for conformance to the Microsoft .NET Framework Design Guidelines.

To enable code analysis for managed code

  1. Select a project in Solution Explorer.

  2. On the Project menu, click <project name> Properties.

  3. Click Code Analysis.

  4. Select Enable Code Analysis on Build (defines CODE_ANALYSIS constant).

To enable code analysis for managed extension for C++ code

  1. Select a project in Solution Explorer.

  2. On the Project menu, click <project name> Properties.

  3. Expand Configuration Properties and expand Code Analysis.

  4. Set Enable Code Analysis For Managed Binaries on Build to Yes.

To disable code analysis for managed code

  1. Select a project in Solution Explorer.

  2. On the Project menu, click <project name> Properties.

  3. Click Code Analysis.

  4. Clear Enable Code Analysis on Build (defines CODE_ANALYSIS constant).

To disable code analysis for managed extension for C++ code

  1. Select a project in Solution Explorer.

  2. On the Project menu, click <project name> Properties.

  3. Expand Configuration Properties and expand Code Analysis.

  4. Set Enable Code Analysis For Managed Code to No.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft