Sonarqube with dotnet core works fine on the command line, but not from Jenkins

I am trying to run Sonarqube on a Jenkins .NET Core 2.0 solution using SOnarQube MsBuild on Windows.

It works fine when I execute the following script from the Jenkins workspace:

C:\SonarQube\bin\MSBuild.SonarQube.Runner.exe begin /k:XXXX.Campaigns /n:CI /v: /d:sonar.host.url=http://x.x.x.x:9000 /d:sonar.verbose=true /d:sonar.projectBaseDir="C:\Program Files (x86)\Jenkins\workspace\CI"
dotnet clean
dotnet build
C:\SonarQube\bin\MSBuild.SonarQube.Runner.exe end

But when I execute the same command from Jenkins, I received this message:

Unable to integrate integration with SonarQube MSBuild: SonarQube was unable to gather the necessary information about your projects. Possible reasons:

  • The project was not built - the project should be built in between the initial and final steps.
  • An unsupported version of MSBuild was used to create the project. Currently MSBuild 14.0 up
  • Start, line or end steps not all run from the same folder

Jenkins 2.46.2 - MSBuild 15 - Sonarqube 6.7 Sonar MsBuild 4.0.2.892. Jenkins, , script . .Net 4.5.2 .

+1
1

. Windows, . dotnet build Sonarqube. @Valeri!

+3

Source: https://habr.com/ru/post/1694253/


All Articles