0

When I am trying to run below commandsfor my dotnet code(version 2.2)

dotnet sonarscanner begin /k:"project-key" 
dotnet build <path to solution.sln>
dotnet sonarscanner end 

I am getting (SonarQube Analysis is only supported with msbuild 14 or msbuild 15) in build step with the dotnet-scanner version == 4.3.1

Rashmi Jain
  • 1,385
  • 12
  • 18
  • For "dotnet code" is that "dotnet core" or "dotnet framework". At the time of this writing, .NET core 2.2 is end-of-life [Download .NET Core](https://dotnet.microsoft.com/download/dotnet-core). Is "dotnet-scanner version" the version of SonarQube Analysis tool? According to [SonarScanner for MSBuild](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-msbuild/) only list prerequisites for version 4.7, 4.7.1, and 4.8 which all support .NET core 2.0+. – lordhog May 06 '20 at 21:44

2 Answers2

0

Upgrade the dotnet-scanner version to latest, the issue will get resolved.

Rashmi Jain
  • 1,385
  • 12
  • 18
0

If you already installed Visual Studio 2019 Community, here is the solution.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
gmspacex
  • 642
  • 5
  • 12
  • This would had been phased asking the author to install the current version of Visual Studio, 2019 Community edition as suggested, which installed version MSBuild 16 [MSBuild](https://en.wikipedia.org/wiki/MSBuild), but unclear which version the author is using. – lordhog May 06 '20 at 21:51