0

In Visual Studio 2022, one could access the "Calculate code metrics" feature by going into Analyze -> Calculate Code Metrics... -> For [project/solution]

However, in Visual Studio 2026, the Analyze menu was removed entirely.

Can I still access the Calculate Code Metrics option?

1 Answer 1

4

The Analyze menu has been removed in Visual Studio 2026. The functionality provided by this menu has been moved into different places (i.e. Code Cleanup was moved into project context menus in Solution Explorer, etc).

To access Calculate code metrics, in Visual Studio 2026, simply click on View -> Other windows -> Code Metrics. In the tool window that opened, press this button: Button with the "Calculate Code Metrics for Selection" tooltip. It will calculate code metrics for the selected/current project.

Note: There is no "for project/solution" option anymore. Instead, you have to select the individual project or solution via Solution Explorer whose code metrics will be calculated:

  • In order to calculate code metrics for the entire solution, select the solution in Solution Explorer prior to calculating code metrics
  • In order to calculate code metrics for a project, select the individual project in Solution Explorer prior to calculating code metrics

In addition, the Code Metrics tool no longer updates the results automatically (i.e. adding 3 lines of code doesn't update it). In order to update the result, press the same Button with the "Calculate Code Metrics for Selection" tooltip button.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.