Sonarqube Scan Fails on VSTS


(Raghava) #1

We are using SonarQube VSTS extension version 4.*
We are trying run SonarQube analysis on .NET 4.6 Solution on VSTS server
We have created a job where we have added following plugins in the order
1 - Use Nuget 4.8.1
2 - NuGet restore
3 - Prepare analysis on SonarQube
4 - Build solution
5 - Run Code Analysis
6 - Publish Quality Gate Result
7 - Clean Agent Directories

It runs well till step 4 (Build solution) and even Run Code Analysis also starts and run for some time and finally gets some error as mentioned below

ERROR: Error during SonarQube Scanner Execution
ERROR: null
ERROR:
The SonarQube Scanner did not complete successfully
Post-processing failed. Exit code: 1
SonarScanner.MSBuild.exe failed with return code:1

Note: When I run MSBuild Scanner locally on my machine pointing to our SonarQube server, it succeeds with same Solution/Project.
I had run following command locally
SonarScanner.MSBuild.exe begin /k: "project-key"
MSBuild.exe /t:Rebuild
SonarScanner.MSBuild.exe end