SonarQube MSBuild integration failed: SonarQube could not collect the necessary information about your projects

I have established how these ...

sonarqube-6.2 | sonar scanner-2.8 | sonar-scanner-msbuild-2.2.0.24 | msbuild 14

And I made a Windows batch file for assembly and scanning (sonar). but some projects are fine. but some projects failed.

batch file ...

MSBuild.SonarQube.Runner.exe begin / k:% PROJECT_KEY% / n:% PROJECT_NAME% / v:% BUILD_VERSION% / d: sonar.verbose = true

MSBuild.exe "projects" / t: build / v: m

MSBuild.SonarQube.Runner.exe end

error message ...

SonarQube Scanner for MSBuild 2.2 The default properties file was found in C: \ SONARQUBE \ sonar-scanner-msbuild-2.2.0.24 \ SonarQube.Analysis.xml Loading analysis properties from C: \ SONARQUBE \ sonar-scanner-msbuild-2.2.0.24 \ SonarQube.Analysis.xml Post-processing has begun. SonarQube scanner for MSBuild 2.2 18: 50: 20.591 Download SonarQube analysis configuration from C: \ jenkins_slave_buildpc \ workspace \ amis3_client_sonar.sonarqube \ conf \ SonarQubeAnalysisConfig.xml 18: 50: 20.592 Does not work under TeamBuild 18: 50: 20.592 : \ jenkins_slave_buildpc \ workspace \ amis3_client_sonar.sonarqube Build directory: Recycle bin: C: \ jenkins_slave_buildpc \ workspace \ amis3_client_sonar.sonarqube \ bin Directory Config: C: \ jenkins_slave_buildpc \ jclkins_be_cen_ar_en_came_file workspace \ amis3_client_sonar.sonarqube \ out Configuration file: C: \ jenkins_slave_buildpc \ workspace \ amis3_client_sonar.sonarqube \ conf \ SonarQubeAnalysisConfig.xml Creating the SonarQube project properties file in C: \ jenkins_slave_buildpc \ workspace \ amis3_client_project.ar failed: SonarQube was unable to gather the necessary information about your projects.

:

  • -

  • MSBuild. MSBuild 12.0

  • ,

C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\out\ProjectInfo.log . SonarQube. 18: 50: 20.615 ... 18: 50: 20.617 - . : 1

. - . - .. ?

+4
2

MSBuild.SonarQube.Runner end teamcity. MSBuild .

MSbuild teamcity. .

C:\SonarQube\sonar-scanner-msbuild-3.0.2.656\MSBuild.Sonarqube.runner.exe 
begin /k:"Sonar key here" /n:"Sonar project here" /v:%build.number% 
/d:sonar.log.level=DEBUG 

"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" [path for .sln file 
here] /t:Rebuild 
/p:VisualStudioversion=14.0;Configuration=Release;Platform="Any CPU"

C:\SonarQube\sonar-scanner-msbuild-3.0.2.656\MSBuild.Sonarqube.runner end
+2

, - SonarQube , - , . - :

Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore

, , SonarQube , . . SonarQube MSBuild . :

C:\Users\buildagent\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
0

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


All Articles