0 out of 1 rated this helpful - Rate this topic

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.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.