Code coverage is not showing for .net framework C#

Hi there,

I have setup the sonarQube for my c# project. In sonarQube server I can see the other analysis but I cannot see the code coverage. I see many documents but didn’t solve the problem. I have already followed the documents from sonarQube but didn’t helped.

here is what I am doing:

In my azure pipeline I am preparing the analysis on sonarQube then building my solution then i am running a power shell script for running tests and then to create a xml file with coverage (which is working fine and showing me results).
after that I am also running code analysis and publish Quality Gate result.

Can you please give me in detail steps for .NET framework and C# projects SonarQube analysis which includes code coverage steps? or any other suggestions

hi @qaimmaknojia

dotnet sonarscanner begin ... /d:sonar.cs.opencover.reportsPaths=path/to/coverage.xml ...
dotnet build ...
dotnet test ...
dotnet sonarscanner end ...

Docs for Scanner for MSBuild
Test Coverage & Execution
[Coverage & Test Data] Generate Reports for C#,