TrimbleSolutionsCorporation / VSSonarQubeExtension

This is a SonarQube Extension for Visual Studio
http://visualstudiogallery.msdn.microsoft.com/7fc312c3-f1ab-49f8-b286-dbf7fff37305
GNU Lesser General Public License v3.0
23 stars 15 forks source link

Plugin detecting wrong msbuild path for CxxSonarQubeMsbuidRunner in VS2017 #267

Closed pcoombe closed 6 years ago

pcoombe commented 6 years ago

Using: VS2017 Enterprise 15.3 VSSonarExtension2017 6.3.4

Trying to perform local analysis

Apply the following changes to sonar configuration Files
###################################
########## Begin Stage  ###########
###################################
[Execute] : C:\ProgramData\MSBuidSonarQube\3.0.2.656\SonarQube.Scanner.MSBuild.exe begin /d:sonar.host.url=http://sonarqube /k:Common /n:Common /v:  /s:"C:\Users\\AppData\Local\Temp\tmpBE15.tmp" 

SonarQube Scanner for MSBuild 3.0.2
Loading analysis properties from C:\Users\\AppData\Local\Temp\tmpBE15.tmp
Pre-processing started.
Preparing working directories...
15:11:34.704  Updating build integration targets...
15:11:34.733  Fetching analysis configuration settings...
15:11:35.053  Generating rulesets...
15:11:35.093  Provisioning analyzer assemblies for cs...
15:11:35.094  Installing required Roslyn analyzers...
15:11:35.155  Pre-processing succeeded.
[CxxSonarQubeMsbuidRunner] Capture Environment For Build cmd.exe /c "C:\Program Files\Microsoft Visual Studio 14.0\VC\vcvarsall.bat " && set 
###################################
######## Build Solution ###########
###################################
[Execute] : "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "C:\Development\Common\Common.sln" /v:Detailed /p:SonarQubeTempPath="C:\Development\Common\.sonarqube" /p:Configuration=Debug /p:Platform="Any CPU" /t:Clean;Build /p:VeraTaskEnabled=true /p:RatsTaskEnabled=true /p:CppLintTaskEnabled=true /p:CppCheckTaskEnabled=true  /l:FileLogger,Microsoft.Build.Engine;logfile=C:\Development\Common\.cxxresults\BuildLog.txt;Encoding=UTF-8 /noconsolelogger /m:1 

[CxxSonarQubeMsbuidRunner] The following msbuild processes have been found: 
[CxxSonarQubeMsbuidRunner] The following msbuild processes have been found after running analysis: 
[CxxSonarQubeMsbuidRunner] The following msbuild processes have been found after cleaning up: 
###################################
########### End Stage  ############
###################################
[EndPhase] : C:\ProgramData\MSBuidSonarQube\3.0.2.656\SonarQube.Scanner.MSBuild.exe end
SonarQube Scanner for MSBuild 3.0.2
Default properties file was found at C:\ProgramData\MSBuidSonarQube\3.0.2.656\SonarQube.Analysis.xml
Loading analysis properties from C:\ProgramData\MSBuidSonarQube\3.0.2.656\SonarQube.Analysis.xml
Post-processing started.
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
  1. The project has not been built - the project must be built in between the begin and end steps
  2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 upwards are supported
  3. The begin, build or end steps have not all been launched from the same folder
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
15:11:35.773  Creating a summary markdown file...
15:11:35.778  Post-processing failed. Exit code: 1
[EndPhase] : Failed. Check Log
##teamcity[buildProblem description='sonar-scanner return non 0 error code']]
[CxxSonarQubeMsbuidRunner] Failed analyze project, check log

I can see CxxSonarQubeMsbuidRunner has a /X: option, but it doesn't appear to be set

jmecosta commented 6 years ago

what version of CxxSonarQubeMsbuidRunner are u using?

pcoombe commented 6 years ago

sorry i thought that was in there. Analysis Wrapper Version: 1.9.13 and for completeness MSBuild.SonarQube.Runner: 3.0.2.656

SonarQube itself is 6.4

jmecosta commented 6 years ago

ok, thanks i will take a look

jmecosta commented 6 years ago

@pcoombe it should be fixed in 6.3.7

pcoombe commented 6 years ago

thanks, its working