.NetCore Code Metrics
This suggestion is migrated to Developer Community. Please use below link to view the current status.
Make the Code Metrics feature and command line power tool work against projects/binaries that target .NetCore.
Thanks for the feedback, this feature has been implemented and is now available in Visual Studio 2019 Preview 1.
Please add this into 2017 for .Net Core!!!
The feature you suggested is now available in Visual Studio 2019 Preview 1. Please see below link for details
Mehran Ghainian Hasarouye commented
Please add this Code Metrics tool in Visual Studio 2017 for Asp.net core application as like in VS 2015. it is very helpful to us for build code and checking the Quality Code. Thanks for support.
UPDATE for items #2 and #3 from my previous post:
2) Analyzer NuGet package with ported Code Metrics rules (CA1501, CA1502, CA1505 and CA1506) is available to download from myget: https://dotnet.myget.org/feed/roslyn-analyzers/package/nuget/Microsoft.CodeAnalysis.FxCopAnalyzers/2.6.2-beta2-63202-01. Code metrics rules are disabled by default, but can be turned on from solution explorer or using a ruleset file. This package will soon be pushed into nuget.org.
3) Metrics.exe has been ported to roslyn-analyzers repo with https://github.com/dotnet/roslyn-analyzers/pull/1754, and can be used to generate code metrics report for all C# and VB projects (including netcore/netstandard). https://github.com/dotnet/roslyn-analyzers/issues/1756 tracks the shipping story for this executable, but until then you can enlist locally into the master branch of the repo, and build https://github.com/dotnet/roslyn-analyzers/blob/master/src/Tools/Metrics.csproj to get the executable. Note that this tool performs source based code metrics computation, and hence requires you to supply the project/solution to analyze, not assembly unlike the previous version of this tool.
Visual Studio Team
Given the number of customer requests, following is the planned support for Dev16 Preview1:
1. Code Metrics in Visual Studio will work for all C# and VB projects (net framework, netcore and netstandard). This change has already been submitted into our internal VSO repo.
2. Code Metrics related FxCop rules (CA1501, CA1502, CA1505 and CA1506) have been ported to FxCop analyzers with https://github.com/dotnet/roslyn-analyzers/pull/1740. I will post an update here once a package with these rules is available on nuget.org.
3. We are working on porting over Metrics.exe, which will report the code metrics diagnostics and/or generate a report. This work is tracked with https://github.com/dotnet/roslyn-analyzers/issues/1741. I will post an update here once it is available.
Visual Studio Team
John Callaway commented
Yes, please include Code Metrics for .NET Core apps!
We are developing a Continuous Integration system and we need command line power tool.
This is a big problem for us.
[Deleted User] commented
The missing command line tool is breaking our CI build. :-(
Why isn't it possible to deliver the metrics.exe like in vs2015 before?
Bill Larkin commented
We are developing a Continuous Integration system and just ran up against this roadblock of not having the Code Metrics not available for VS 2017. This is a problem for us.
An absolutely MUST on a Continuous Integration Server
Frank Jakobsen commented
This is not only a feature/command line missing for .Net Core. But for .Net Standard only the command line tool is missing in VS 2017. This is, however, necessary to run the metrics generation on a Continuous Integration Server.