Export (0) Print
Expand All

Code Analysis Rule Set Reference for Managed Code

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic appliesTopic appliesTopic does not applyTopic does not apply

When you configure code analysis for managed code projects in Visual Studio Premium or Visual Studio Ultimate, you are presented with a list of built-in rule sets. You can either use the minimum recommended rules, or you can use other rule sets that relate to your project type. In either case, you can also customize the rule sets to fit your project requirements.

The following table lists the rule sets that you can use in Visual Studio Premium or Visual Studio Ultimate:

Rule Set

Description

Microsoft All Rules

This rule set contains all rules. If you run this rule set, a large number of warnings might be reported. Use this rule set to get a comprehensive picture of all issues in your code. This approach can help you decide which of the more focused rule sets are most appropriate to run for your projects.

Microsoft Basic Correctness Rules

These rules focus on logic errors and common mistakes made in the usage of framework APIs. Include this rule set to expand on the list of warnings that the minimum recommended rules report.

Microsoft Basic Design Guideline Rules

These rules focus on enforcing best practices to make your code easy to understand and use. Include this rule set if your project includes library code or if you want to enforce best practices for easily maintainable code.

Microsoft Extended Correctness Rules

These rules expand on the basic correctness rules to maximize the number of logic and framework usage errors that are reported. These rules emphasize specific scenarios such as COM interoperability and mobile applications. Consider including this rule set if one of these scenarios applies to your project or to find additional problems in your project.

Microsoft Extended Design Guideline Rules

These rules expand on the basic design guideline rules to maximize the number of usability and maintainability issues that are reported. These rules emphasize naming guidelines. Consider including this rule set if your project includes library code or if you want to enforce the highest standards for writing maintainable code.

Microsoft Globalization Rules

These rules focus on problems that prevent data in your application from appearing correctly in different languages, locales, and cultures. Include this rule set if your application is localized, globalized or both.

Microsoft Minimum Recommended Rules

These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. You should include this rule set in any custom rule set that you create for your projects.

Microsoft Security Rules

This rule set contains all Microsoft security rules. Include this rule set to maximize the number of potential security issues that are reported.

Community Additions

ADD
Show:
© 2014 Microsoft