Lines of code = 0 in duplication / coverage graphs or main dashboard summary LOC counters

We have added coverlet/coverage to our Core .Net 3.1 test projects several months ago. But since, SonarQube report bad lines of code counter (null / empty) in some graphs or dashboard (… so, since SonarQube coverage engine is no more used and replaced by coverlet/coverage tools).

Our solutions are organized like this:

/SolutionName
– /src
---- /… folders/sources of the project
---- ProjectName.csproj
– /tests
---- /ProjectTestName
------ /… folders/sources of the project
------ ProjectTestName.csproj

They are stored in some Azure DevOps central repositories. Processed by a CI pipeline to build and generate SonarQube analysis/reports.

Some informations are visible in SonarQube like code smells, modifications, some reports, …

But we have an issue to see Lines of code counter in each Duplication graphic (since coverlet/coverage integration, no more LOC), Coverage graphic (before coverlet/coverage integration, none LOC), main SonarQube dashboard which aggregate all main projects informations (Reliability/Vunerabilities/… are OK, but Lines of code counters are empty ‘-’ for all .Net solutions).

We have trying to upgrade/downgrade coverlet library from 2.1.x to latest 3.1.x, codecoverage is 16.9.4, sonarQube is installed on our systems in 8.9 (build 43852).

Did you have any idea, solution ? We do find valid answers on the forum.

Best,

Hello!

Please give us the following version information:

And we’ll need the logs:

  • please give us the verbose output of the scanner commands (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of the BEGIN and END steps)
  • please give the output of running MSBuild in verbose mode (/v:d)

Also, please tell us:

  • what are the commands you are running to do the analysis?
  • are you running all commands from the same folder?

In addition, please see the following guides: