SonarQube analysis could not be completed because the analysis configuration file was not found
SonarQube gives me below error when I integrate xamarin app with jenkins on windows sever
SonarQube Scanner for MSBuild 3.0
Default properties file was found at C:\SonarQube\bin\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube\bin\SonarQube.Analysis.xml
Post-processing started.
13:49:43.952 SonarQube analysis could not be completed because the analysis configuration file could not be found: C:\Users\Administrator\.jenkins\workspace\Xamarin-ProjectTemplate\.sonarqube\conf\SonarQubeAnalysisConfig.xml.
13:49:43.952 Post-processing failed. Exit code: 1
I followed the below guide https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild
SonarQube.Scanner.MSBuild.exe begin /k:"org.sonarqube:sonarqube-scanner-msbuild" /n:"Project Name" /v:"1.0"
MSBuild.exe /t:Rebuild
SonarQube.Scanner.MSBuild.exe end
Please help me to solve this problem.
I have the same problem. You need to find the right one MSBuild.exe
.
I have several in c:\Windows\Microsoft.NET\Framework64\...
and also in c:\Program Files (x86)
For my project in Visual Studio 2017
with the .NETFramework,Version=v4.6.1
correct one MSBuild.exe
is:
"c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\amd64\MSBuild.exe" /t:Rebuild
For Enterpsie, the version should be:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild" /t:Rebuild
The errors reported at the end of the SonarQube report are sometimes less helpful than the errors when you start.
For example, when I got this error, scrolling to the top of the log showed that I had incorrectly set the sonar.projectKey value, but this message that the OP shared is still displayed at the end.
I got the same error and was able to fix it by excluding "/ t: Rebuild" from the second step. Also used by VS2017 MSBuild.exe
These are the 3 commands I ran on Windows Command Prompt (CMD):
1>> SonarScanner.MSBuild.exe begin /k:"MyProjectName"
2>> "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe" "MySolution.sln"
3>> SonarScanner.MSBuild.exe end