Coverage in project .NET (Visual Studio)

An analysis is done in Visual Studio and you already have Coverage in the project.

When performing the analysis, it does not indicate that you have coverage in the SonarQube portal.

Why doesn’t the coverage mark me?

"

Lines
E:\Users\admin\Downloads\sonar-scanner-msbuild-4.7.1.2311-net46\SonarScanner.MSBuild.exe" begin /k:“testJhhh” /d:sonar.host.url=“http://XXXXXXXX:9000” /d:sonar.login=“af6a0ad1a7139809d80a939b980e3e5c9567544aasasd” /d:sonar.cs.vscoveragexml.reportsPaths=“E:\Users\jemartinezan\source\repos\CodeCoverageTest2\target\site\jacoco\pruebas.coveragexml”

“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MsBuild.exe” /t:Rebuild

“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Dynamic Code Coverage Tools\codecoverage.exe” collect /output:visualstudio.coverage “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe” “E:\Users\jemartinezan\source\repos\CodeCoverageTest2\CodeCoverageTest2\bin\Debug\netcoreapp3.1\CodeCoverageTest2.dll”

“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Dynamic Code Coverage Tools\codecoverage.exe” analyze /output:prueba.coveragexml visualstudio.coverage

“E:\Users\admin\Downloads\sonar-scanner-msbuild-4.7.1.2311-net46\SonarScanner.MSBuild.exe” end /d:sonar.login=“af6a0ad1a7139809d80a939b980e3e5c9567544aasasd”

I have a project in Visual Studio, I have the project coverage

At the time of performing the analysis so that it is displayed on the SonarQube portal
Run the following lines

“…\sonar-scanner-msbuild-4.7.1.2311-net46\SonarScanner.MSBuild.exe” begin /k:“testJesusEmmanuel” /d:sonar.host.url=“http://XXXXXXXXX:9000” /d:sonar.login=“af6a0ad1a7139809d80a939b980e3e5c9567544aasa” /d:sonar.cs.vscoveragexml.reportsPaths="…\source\repos\CodeCoverageTest2\target\site\jacoco\pruebas.coveragexml"

“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MsBuild.exe” /t:Rebuild

“…\sonar-scanner-msbuild-4.7.1.2311-net46\SonarScanner.MSBuild.exe” end /d:sonar.login=“af6a0ad1a7139809d80a939b980e3e5c9567544aasa”

The analysis does not mark any errors
But it also does not add the percentage of coverage

hi @jemartineza

sorry for the delay.

First :

  • what is the version of SQ?
  • what is the version of the plugin?
  • what is the version of MSBuild you are using?
  • what is the version of Scanner for MSBuild you are using?
  • what are the commands you are running to do the analysis?
  • are you running all commands from the same folder?

Second:

  • please give us the verbose output of END command (please run SonarScanner.MSBuild.exe begin /k:“MyProject” /d:sonar.verbose=true as the begin step, and please attach the output of END step)