How to: Set Code Analysis Properties for C/C++ Projects
You can configure which rules the code analysis tool uses to analyze the code in each configuration of your project. In addition, you can direct code analysis to suppress warnings from code that was generated and added to your project by a third-party tool.
You can decide whether to enable code analysis for your project by selecting Enable Code Analysis For C/C++ on Build. In combination with the Configuration list, you could, for example, decide to disable Code Analysis for debug builds and enable it for release builds.
If your project contains managed code, you can decide whether to enable or disable Code Analysis by selecting Enable Code Analysis on Build.
Code analysis is designed to help you improve the quality of your code and avoid common pitfalls. Therefore, consider carefully whether to disable code analysis. It is usually better to disable rule sets or individual rules that you do not want applied to your project.
Developers frequently use tools to help develop applications quickly. These tools can generate code that is added to the project. You might want to see the rule violations that code analysis discovers in generated code. However, you might not want to see them if you do not want to maintain the code.
The Suppress Results From Generated Code check box on the General properties page lets you select whether you want to see code analysis warnings from managed code that is generated by a third-party tool.