Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
How to: Enable and Disable Code Analysis for Managed Code
-
2012年11月16日
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
Select a project in Solution Explorer.
On the Project menu, click <project name> Properties.
Click Code Analysis.
Select Enable Code Analysis on Build (defines CODE_ANALYSIS constant).
To enable code analysis for managed extension for C++ code
Select a project in Solution Explorer.
On the Project menu, click <project name> Properties.
Expand Configuration Properties and expand Code Analysis.
Set Enable Code Analysis For Managed Binaries on Build to Yes.
To disable code analysis for managed code
Select a project in Solution Explorer.
On the Project menu, click <project name> Properties.
Click Code Analysis.
Clear Enable Code Analysis on Build (defines CODE_ANALYSIS constant).
To disable code analysis for managed extension for C++ code
Select a project in Solution Explorer.
On the Project menu, click <project name> Properties.
Expand Configuration Properties and expand Code Analysis.
Set Enable Code Analysis For Managed Code to No.