Share via


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

  3. Click Code Analysis.

  4. Select Enable Code Analysis.

To enable code analysis for ASP.NET application

  1. Select a project in Solution Explorer.

  2. On the Website menu, click Code Analysis Configuration.

  3. Select Enable Code Analysis.

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

  1. Select a project in Solution Explorer.

  2. On the Project menu, click Properties.

  3. Expand Configuration Properties node.

  4. Click the Code Analysis.

  5. Select Enable Code Analysis For Managed Code.

To disable code analysis for managed code

  1. Select a project in Solution Explorer.

  2. On the Project menu, click Properties.

  3. Click Code Analysis.

  4. Clear Enable Code Analysis.

To disable code analysis for ASP.NET application

  1. Select a project in Solution Explorer.

  2. On the Website menu, click Code Analysis Configuration.

  3. Clear Enable Code Analysis.

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

  1. Select a project in Solution Explorer.

  2. On the Project menu, click Properties.

  3. Expand Configuration Properties node.

  4. Click Code Analysis.

  5. Clear Enable Code Analysis For Managed Code.