"E:\Tools\SonarQube\MS\MSBuild.SonarQube.Runner.exe" begin /key:"JIQITONG" /name:"JIQITONG" /version:"1.9"
is OK
Step Two
MSBuild.exe "D:\JiQiTongTrunk\ZhengHe.AnHui.Dev.sln" /property:Configuration=Release /p:Platform="Any CPU" /t:rebuild /p:VisualStudioVersion=15.0 is OK
is OK
Step Three
D:\JiQiTongTrunk>"E:\Tools\SonarQube\MS\MSBuild.SonarQube.Runner.exe" end
WARNING: ------------------------------------------------------------------------
This executable is deprecated and may be removed in next major version of the SonarScanner for MSBuild. Please use 'SonarScanner.MSBuild.exe' instead.
------------------------------------------------------------------------
SonarScanner for MSBuild 4.10
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
21:42:09.154 21:42:09.149 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
21:42:09.155 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
21:42:09.156 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
21:42:09.157 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
21:42:09.157 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
21:42:09.157 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
21:42:09.158 21:42:09.15 SonarQube.Integration.ImportBefore.targets does not exist at C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\Current\Microsoft.Common.targets\ImportBefore
21:42:09.158 21:42:09.154 sonar.log.level=DEBUG was specified - setting the log verbosity to 'DEBUG'
21:42:09.16 Loading the SonarQube analysis config from D:\JiQiTongTrunk\.sonarqube\conf\SonarQubeAnalysisConfig.xml
21:42:09.161 Not running under TeamBuild
21:42:09.161 Analysis base directory: D:\JiQiTongTrunk\.sonarqube
Build directory:
Bin directory: D:\JiQiTongTrunk\.sonarqube\bin
Config directory: D:\JiQiTongTrunk\.sonarqube\conf
Output directory: D:\JiQiTongTrunk\.sonarqube\out
Config file: D:\JiQiTongTrunk\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to D:\JiQiTongTrunk\.sonarqube\out\sonar-project.properties
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.25420.1 and higher are supported.
3. The begin, build and end steps have not all been launched from the same folder
4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
Writing processing summary to D:\JiQiTongTrunk\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
21:42:09.198 Post-processing failed. Exit code: 1
Why?
I sure four possible problems all is ok。
Version of SonarQuble Server is 8.4.2。
My pc is windows 10。
MsBuild.exe 15.9
Folder“C:\Users\lenovo\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore” is empty。
My first question (something that you hint at but that you don’t make explicit) is Did that process work in the past with a “previous version” ?
If yes, what did you change between previous version and current version ?
Second point is: Can you send the full logs of all the analysis steps from Step One to the final error. And since you will have to re-run the analysis can you add /d:sonar.verbose=true to the begin step (Step 1)
Only this will allow me to troubleshoot you problem properly
D:\04-项目源码\济南市中小企业公共服务中心\Trunk>“E:\Tools\SonarQube\MS\MSBuild.SonarQube.Runner.exe” begin /k:“JIQITONG” /n:“JIQITONG” /v:%build.number% /d:sonar.log.level=DEBUG /d:sonar.verbose=true
WARNING: ------------------------------------------------------------------------
This executable is deprecated and may be removed in next major version of the SonarScanner for MSBuild. Please use ‘SonarScanner.MSBuild.exe’ instead.
There’s apparently only the logs of the begin step attached, and it ends successfully.
I also noticed that on the first post you used the Scanner for MSbuild 4.10 and on the 2nd the Scanner for MSBuild 4.3.1. Is there a reason for that ?
Generally speaking you should always use the latest version of scanners (Scanner for MSBuild 4.10 in the current case). It’s the latest and greatest and is backward compatible.
So, unless you have a reason, still to the same scanner from 1 run to the other.
And please send me the logs of the 3 steps
MSBuild.SonarQube.Runner.exe begin …
MSBuild …
MSBuild.SonarQube.Runner.exe end
You may want to attach a zip to the thread rather than inline in the post, since the logs may be quite long.
Hello,
No need to try the scanner-cli. When scanning a .Net project you must use the Scanner for MSBuild, and it’s strongly recommended to use consistently the latest version.