Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculate Code Metrics for .NET Core Projects?

Tags:

I am playing arround with ASP.NET Core and .NET Core projects. For classic C# projects Visual Studio 2015 has got the feature to calculate code metrics. For .NET Core the support is missing in the Preview 2 Tooling.

Does anybody know a workaround until the tooling is more complete?

like image 872
Ralf Bönning Avatar asked Jul 09 '16 21:07

Ralf Bönning


People also ask

What is calculate code metrics?

Code metrics is a set of software measures that provide developers better insight into the code they are developing.

How do you generate code metrics data?

You can generate code metrics results for an entire solution in any of the following ways: From the menu bar, select Analyze > Calculate Code Metrics > For Solution. In Solution Explorer, right-click the solution and then select Calculate Code Metrics.

Where can we find code metrics for a pipeline execution?

The Code Metrics report will be published as an XML file inside the Artifact generated after the pipeline. For this navigate to the Runs tab of your pipeline, click on any Run you want. 17. You can find the report by clicking Artifacts button.

How do you check code complexity in Visual Studio code?

From Visual Studio's menu, select Analyze -> Calculate Code Metrics. Then, either select “For Solution”, if you want check all the projects in the solution, or select the project you want. The results will be displayed in the Output window. Visual Studio shows the cyclomatic complexity for each function and property.


1 Answers

It is now available in VS 2019 Preview 1, according to this:

https://developercommunity.visualstudio.com/idea/351625/netcore-code-metrics.html?childToView=404758

like image 76
Squirrelkiller Avatar answered Sep 22 '22 02:09

Squirrelkiller