Search code examples
visual-studio.net-corecode-metrics

visual studio 2017 could not identify platform on calculating code metrics with dotnet core solutions


I'm receiving error on code analysis with visual studio 2017 on dotnet code projects. I have to say that in other projects everything is ok.

I searched but nothing special to solve this error. the exact error is:

Message: An error occurred while calculating code metrics for target file 'E:\Shokri\Project\Kalgram\Kavenegar\bin\Debug\netcoreapp2.2\Kavenegar.dll' in project Kavenegar. Could not identify platform for 'E:\Shokri\Project\Kalgram\Kavenegar\bin\Debug\netcoreapp2.2\Kavenegar.dll'.


Solution

  • Code metrics is not available for dotnet core projects yet. The error message is terrible. You can vote for the feature using the links below:

    https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/33459643--netcore-code-metrics

    https://developercommunity.visualstudio.com/content/idea/351625/netcore-code-metrics.html