SonarCloud is not reporting code coverage

I’m currently using TeamCity to build a C# MVC Web App and SonarCloud to display the code metrics including code coverage.

Currently the code coverage is displaying 0% however I can verify in the build log that SonarCloud is accepting and processing the dotCover code coverage report:

Any help is appreciated.

After leaving it overnight the coverage is now suddenly eing displayed:


Can you please help me out what parameters you have used to configure code coverage using dotcover reports… I am also facing similar issue and stuck with it.

Any help is highly appreciated.


1 Like

I used the following parameter for dotcover when running SonarScanner.MSBuild.exe begin

The dotcover report will be specified to be created at the location of

I then use a Powershell script I got from StackOverflow to pick up the dotcover raw data with a generated suffix and move it to a specified location with a fixed name.

$snapshot = Get-ChildItem “” -Filter coverage_dotcover*.data
| select -ExpandProperty FullName -First 1
copy $snapshot\

I then use a final CommandLine (cmd) step to create a HTML report

dotCover.exe report /ReportType=HTML /\ /\coverage.html

Everything else is as normal. It’s a bit hacky but it seems to be working. Hope this helps others.