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?
Code metrics is a set of software measures that provide developers better insight into the code they are developing.
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.
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.
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.
It is now available in VS 2019 Preview 1, according to this:
https://developercommunity.visualstudio.com/idea/351625/netcore-code-metrics.html?childToView=404758
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With