Unable to get the code coverage for Sonarqube project (.NET)

I am unable to get the code coverage for .Net applications in SonarQube dashboard. I have added below mentioned tasks in the pipeline.

AM I missing any task, or shall I need to add any script for getting code coverage.

Hey there.

There seems to be a lot going on in your build pipeline.

  • You build three solutions separately
  • You run tests
  • Then you run a Visual Studio Build task
  • Your Run Code Analysis and Publish Quality Gate Result steps appear to be using an old version

Can you help us understand why your build is configured like that?

Typically all that needs to be done when using VSTest is to tick the Code Coverage Enabled box for that task, and make sure you’re using the latest versions of the SonarQube tasks.