I'm trying to launch Sonarqube on a .NET Core 2.0 solution from Jenkins using SOnarQube MsBuild on Windows.
It works fine when i execute the following script from Jenkins workspace:
C:SonarQubeinMSBuild.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)JenkinsworkspaceCI"
dotnet clean
dotnet build
C:SonarQubeinMSBuild.SonarQube.Runner.exe end
But when i execute the same command from Jenkins, i got this message:
The SonarQube MSBuild integration failed: SonarQube was
unable to collect the required information about your projects.
Possible causes:
- The project has not been built - the project must be built in
between the begin and end steps.
- An unsupported version of MSBuild
has been used to build the project. Currently MSBuild 14.0 upwards
- The begin, build or end steps have not all been
launched from the same folder
I use Jenkins 2.46.2 - MSBuild 15 - Sonarqube 6.7 & Sonar MsBuild 4.0.2.892. I tried using Jenkins build steps, command step, command step with a script without success. On a classical .Net 4.5.2 project, it works.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…