Cannot send build results to SonarQube server

I’m working on a POC and I’m able to create a project and send the build results to SonarQube localhost server without any errors. But when I build the same project and send the the results to production server, build will succeed but the results on the server is empty.

In the server, I’m getting the following warning.

SCM provider autodetection failed. Please use “sonar.scm.provider” to define SCM of your project, or
disable the SCM Sensor in the project settings.

I found that, its not creating the output-cs folder. when i run these commands in local its creating those files and folders but for production server its not.

Path to output-cs


Code I ran for localhost:

C:\Users\Administrator\Desktop\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe begin 
/k:"my-test-project"  /d:sonar.verbose=true /"http://localhost:9000" 

MsBuild.exe /t:Rebuild

C:\Users\Administrator\Desktop\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe end 

Code I ran for Production Sever:

C:\Users\Administrator\Desktop\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe begin 
/k:"my-test-project" /d:sonar.verbose=true /"http://prod-server-url" 

MSBuild.exe /t:Rebuild

C:\Users\Administrator\Desktop\sonar-scanner-msbuild-\SonarScanner.MSBuild.exe end 

I went through the build stack trace and found some warnings.

WARN: No coverage report can be found with sonar.coverage.jacoco.xmlReportPaths=‘build/reports/jacoco/test/jacocoTestReport.xml’. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml


  1. Do we need to specifically mention some additional parameters when building for server compared to localhost?

Note: This is c# application.


There are a couple things here. First the SCM warning is a red herring and unrelated to what you’re seeing.

Are you using the same project in both cases? And the same version of SonarQube?

I believe it has changed in recent versions, but naming your project “Test” or “Test project” can get it treated as composed of only tests - which would result in an empty project dashboard since no lines of “code” would be detected.

Does this resonate with what’s going on for you?