Share via


How to: Generate Code Metrics Data

You can decide to generate code metrics results for either an entire solution or a selected project.

Requirements

Visual Studio 2012 Ultimate, Visual Studio 2012 Premium

To generate code metrics results for an entire solution

  • Click Analyze menu, and then click CalculateCode Metrics for Solution.

    - or -

  • In Solution Explorer, right-click the solution and then click CalculateCode Metrics.

    - or -

  • In the Code Metrics Results window, click the CalculateCode Metrics for Solution button.

    The results are generated and the Code Metrics Results window is displayed.

To generate code metrics results for one or more selected projects

  1. In Solution Explorer, select one or more projects.

  2. Click Analyze, and then click Generate Code Metrics for Selected Projects(s).

    - or -

    Right-click your selections and then click CalculateCode Metrics.

The results are generated and the Code Metrics Results window is displayed.

To view the results details

  • Expand the tree in the Hierarchy column.

See Also

Other Resources

Measuring Complexity and Maintainability of Managed Code