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:
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.
I used the following parameter for dotcover when running SonarScanner.MSBuild.exe begin
/d:sonar.cs.dotcover.reportsPaths=%teamcity.build.checkoutDir%\coverage.html
The dotcover report will be specified to be created at the location of %teamcity.build.checkoutDir%
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.