Fail to ends SonarQube analysis for .net 4.5.2 solution


I’am trying to analyse a dotnet framework solution using .net 4.5.2 Framework.
These project is a web application with some projects within a solution.

The version of SonarQube is the zip package dowloadable here Try Out SonarQube | SonarQube Docs.

Then I use the next three commands from SonarQube running locally:
1- C:\tmp\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe begin /k:"myapp" /"http://localhost:9000" /d:sonar.login="xxxxxxxxxxxxxxxxxxxxx"
=> everything is ok
2- "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MsBuild.exe" /t:restore /t:Rebuild
=> some compilation warnings but it looks ok
3- C:\tmp\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe end /d:sonar.login="xxxxxxxxxxxxxxxxxxxxx"
=> get the error message “Incorrect syntax.
The SonarScanner did not complete successfully
18:04:38.176 Post-processing failed. Exit code: 1”

I then tryed:
1- adding the version in the first command with /v:4.5.2
=> nothing changed
2- execute the third command with verbose using /d:sonar.verbose=true

SonarScanner for MSBuild 5.5.3
Using the .NET Framework version of the Scanner for MSBuild
Default properties file was found at C:\tmp\sonar-scanner-msbuild-\SonarQube.Analysis.xml
Loading analysis properties from C:\tmp\sonar-scanner-msbuild-\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Post-processing started.
18:06:12.172  Using environment variables to determine the download directory...
18:06:12.255  18:06:12.252  C:\sources\myapp\.sonarqube\bin\targets\SonarQube.Integration.targets does not exist
18:06:12.259  18:06:12.255  This setting is not valid in the "end" phase in this version of the C# plugin: sonar.verbose
18:06:12.262  Post-processing failed. Exit code: 1

SonarQube version :
Sonar scanner version : sonar-scanner-msbuild-
Solution .net version : 4.5.2
With Windows 10 with dotnet framework 4.8 installed

I am wondering if dotnet 4.5.2 is still supported by sonarqube scanner. Can anyone help me to understand what’s wrong please?

Thank you :slightly_smiling_face:

Hello @thibaut

To get the verbose logs you have to pass the /d:sonar.verbose=true argument to the begin step, and it will in that case have verbose logging for both the begin and end steps.
Could you please run the begin step with /d:sonar.verbose=true and forward us both the logs for the begin and end steps?

All the best,

1 Like

Hello all,

Thank you Caba_Sagi for your reply.
I did some other investigations on my side and I found out that there was two issues with PATH on my machine.

  • I had a different JRE installed and references in Windows PATH
  • The JAVA_HOME path contained a double quote character at the end of the value (C:\Program Files\Eclipse Adoptium\jdk-")

With the first one removed and the second cleaned, it works well.

Sorry for the disruption and thank you again to answer my post.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.