Error: The syntax of the command is incorrect

Hello community,
I am trying to use the Sonarqube MSBuild scanner v5.8 for a C# and .Net Core mixed solution.
msbuild version v17 (Visual Studio 2022)
Dotnet version v7.0.100

The error I am facing happens on the last SonarScanner.MSBuild.exe end command:

The steps I have done so far:

nuget restore solution.sln
dotnet restore
cd module
SonarScanner.MSBuild.exe begin /k:myName /d:sonar.host.url="http://127.0.0.1:9000" /d:sonar.login="sqp_superlongtoken"
msbuild "./module.csproj" /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.login="sqp_superlongtoken"

I have been across forums and different websites but I couldn’t find anything really helpful.
What am I missing?

Thank you for your replies in advance.
Lucio

Hello @Lucio_Falco

Apologies for the delay, we need the verbose logs to be able to help

Please share the Scanner for .NET verbose logs

  • Add /d:"sonar.verbose=true" to the…
    • SonarScanner.MSBuild.exe or dotnet sonarscanner begin command to get more detailed logs
      • For example: SonarScanner.MSBuild.exe begin /k:"MyProject" /d:"sonar.verbose=true"
  • The important logs are in the END step (i.e. SonarQubeAnalyze / SonarCloudAnalyze / “Run Code Analysis”)

Share the msbuild detailed logs

MsBuild.exe /t:Rebuild /v:d

Thanks.

dotnet build -v:d