SonarQube Issue – Missing Code Coverage / Analysis Behavior

Versions used:

SonarQube Server: Enterprise Edition v2025.1.3
Scanner: Azure DevOps SonarQube tasks (v6 / v8.x)
Build: Classic Azure DevOps (TFS) pipeline
Language: C# (.NET Framework)

Deployment type:

Central SonarQube server (enterprise/internal hosted, not Docker/Helm from my side)

What I’m trying to achieve:

Get unit test results and code coverage properly reflected in SonarQube dashboard
Ensure both old and new code coverage is visible and accurate

What I have configured:

sonar.cs.vstest.reportsPaths=$(Agent.BuildDirectory)/TestResults/**/\*.trx
sonar.cs.vscoveragexml.reportsPaths=$(Agent.BuildDirectory)/TestResults/Combined/**/\*.coveragexml

What I’ve tried so far:

Ensured .trx files are generated and available in TestResults
Combined coverage files into a Combined folder
Verified .coveragexml files exist in build output
Updated SonarQube tasks (moved from older version to v6+)
Checked pipeline execution time (unit tests now running faster than before)
Confirmed pipeline logs show: ANALYSIS SUCCESSFUL

Issue:

Code coverage is not displayed in SonarQube (both new and overall code)
Some test projects show 0% coverage or empty results. This issue is happening after migrating from onprem sonarqube to cloud sonarqube

Hi,

You filed this under SonarQube Server, and you provided your server version, but it sounds like the problem actually shows up in Cloud?

Did this work in Server? And with the exact-same configuration?

How did you migrate the project from Server to Cloud? Simply edit the host URL and add the organization ID in the existing pipeline? Or is this a new pipeline? And if the latter, can you compare/contrast the old and new pipelines?

 
Ann