SonarQube 10.6 .NET coverage - still none

Hey guys,

I have just upgraded SonarQube ZIP on Windows to 10.6, hoping that it’ll resolve the issue with 0.0% of code coverage that was more or less mentioned here

The ThrowableProxy error does no longer manifest during Azure DevOps task runs, however, SonarQube still shows 0% coverage for me:
image

I don’t really understand why that doesn’t work,

  • I run dotnet test with Code Coverage data collector, that does generate multiple *.coverage files
  • I run dotnet coverage merge that compiles all those *.coverage files into one coverage.xml file.
  • I pass the appropriate parameters to Sonar task:
      - task: SonarQubePrepare@6
        displayName: Init SonarQube
        inputs:
          SonarQube: SonarQube Test
          scannerMode: MSBuild
          projectKey: $(projectKey)
          projectVersion: $(version)
          extraProperties: 
            sonar.cs.vscoveragexml.reportsPaths=**/coverage.xml
  • I see in the SonarQubeAnalyze@6 task that all the coverage files are being picked up:
INFO: Sensor C# Tests Coverage Report Import [csharp]
INFO: Parsing the Visual Studio coverage XML report C:\***\_work\1\.\s\coverage.xml
INFO: Adding this code coverage report to the cache for later reuse: C:\***\_work\1\.\s\coverage.xml

and

2024-07-08T07:13:05.1597183Z Calling the TFS Processor executable...
2024-07-08T07:13:05.3144188Z Fetching code coverage report information from TFS...
2024-07-08T07:13:05.3156285Z Attempting to locate a test results (.trx) file...
2024-07-08T07:13:05.6197136Z Looking for TRX files in: C:\***\_work\1\TestResults
2024-07-08T07:13:05.6200545Z No test results files found
2024-07-08T07:13:05.9248787Z Did not find any binary coverage files in the expected location.
2024-07-08T07:13:05.9249018Z Falling back on locating coverage files in the agent temp directory.
2024-07-08T07:13:05.9249202Z Searching for coverage files in C:\***\_work\_temp
2024-07-08T07:13:05.9249363Z All matching files: count=25
2024-07-08T07:13:05.9249572Z 	C:\***\_work\_temp\1008324f-f7f7-42d0-94b8-9413a4d25a9c\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage
2024-07-08T07:13:05.9249847Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_13\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_11.coverage
2024-07-08T07:13:05.9250114Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_20\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage
2024-07-08T07:13:05.9250386Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_21\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_12.coverage
2024-07-08T07:13:05.9250646Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_27.coverage
2024-07-08T07:13:05.9250910Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_50\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_43.coverage
2024-07-08T07:13:05.9251163Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_20.coverage
2024-07-08T07:13:05.9251419Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_34\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_27.coverage
2024-07-08T07:13:05.9251665Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_48\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_43.coverage
2024-07-08T07:13:05.9251918Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_59\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_50.coverage
2024-07-08T07:13:05.9252160Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_04\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_00.coverage
2024-07-08T07:13:05.9281812Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_14\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_08.coverage
2024-07-08T07:13:05.9282084Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_30\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_24.coverage
2024-07-08T07:13:05.9282476Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_31\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_28.coverage
2024-07-08T07:13:05.9282744Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_35\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_31.coverage
2024-07-08T07:13:05.9282997Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_41\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_33.coverage
2024-07-08T07:13:05.9283246Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_43\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_38.coverage
2024-07-08T07:13:05.9283517Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_11\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_07.coverage
2024-07-08T07:13:05.9283770Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_12\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_09.coverage
2024-07-08T07:13:05.9284027Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_20.coverage
2024-07-08T07:13:05.9284272Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_29\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_23.coverage
2024-07-08T07:13:05.9284522Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_30.coverage
2024-07-08T07:13:05.9284771Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_36\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_32.coverage
2024-07-08T07:13:05.9285020Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_37\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_34.coverage
2024-07-08T07:13:05.9285273Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_39\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_36.coverage
2024-07-08T07:13:06.3018903Z Unique coverage files: count=25
2024-07-08T07:13:06.3019405Z 	C:\***\_work\_temp\1008324f-f7f7-42d0-94b8-9413a4d25a9c\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage
2024-07-08T07:13:06.3019885Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_13\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_11.coverage
2024-07-08T07:13:06.3020318Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_20\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage
2024-07-08T07:13:06.3020699Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_21\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_12.coverage
2024-07-08T07:13:06.3021102Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_27.coverage
2024-07-08T07:13:06.3021494Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_50\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_43.coverage
2024-07-08T07:13:06.3021839Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_20.coverage
2024-07-08T07:13:06.3022191Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_34\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_27.coverage
2024-07-08T07:13:06.3022539Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_48\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_43.coverage
2024-07-08T07:13:06.3022895Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_59\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_50.coverage
2024-07-08T07:13:06.3023829Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_04\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_00.coverage
2024-07-08T07:13:06.3024284Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_14\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_08.coverage
2024-07-08T07:13:06.3024625Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_30\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_24.coverage
2024-07-08T07:13:06.3024973Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_31\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_28.coverage
2024-07-08T07:13:06.3025314Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_35\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_31.coverage
2024-07-08T07:13:06.3025651Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_41\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_33.coverage
2024-07-08T07:13:06.3025996Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_43\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_38.coverage
2024-07-08T07:13:06.3026340Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_11\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_07.coverage
2024-07-08T07:13:06.3026685Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_12\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_09.coverage
2024-07-08T07:13:06.3027026Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_20.coverage
2024-07-08T07:13:06.3027371Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_29\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_23.coverage
2024-07-08T07:13:06.3027712Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_30.coverage
2024-07-08T07:13:06.3028060Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_36\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_32.coverage
2024-07-08T07:13:06.3028401Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_37\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_34.coverage
2024-07-08T07:13:06.3028738Z 	C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_39\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_36.coverage
2024-07-08T07:13:06.3065645Z Converting coverage file 'C:\***\_work\_temp\1008324f-f7f7-42d0-94b8-9413a4d25a9c\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage' to 'C:\***\_work\_temp\1008324f-f7f7-42d0-94b8-9413a4d25a9c\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coveragexml'.
2024-07-08T07:13:07.7552556Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_13\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_11.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_13\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_11.coveragexml'.
2024-07-08T07:13:07.7652027Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_20\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_20\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_15.coveragexml'.
2024-07-08T07:13:08.0710606Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_21\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_12.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_21\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_12.coveragexml'.
2024-07-08T07:13:08.6261034Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_27.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_27.coveragexml'.
2024-07-08T07:13:09.1318961Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_50\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_43.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_09_50\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_09_43.coveragexml'.
2024-07-08T07:13:09.4233128Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_20.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_20.coveragexml'.
2024-07-08T07:13:09.5770989Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_34\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_27.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_34\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_27.coveragexml'.
2024-07-08T07:13:10.2143814Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_48\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_43.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_48\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_43.coveragexml'.
2024-07-08T07:13:10.3355894Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_59\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_50.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_10_59\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_10_50.coveragexml'.
2024-07-08T07:13:10.9771147Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_04\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_00.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_04\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_00.coveragexml'.
2024-07-08T07:13:11.2594602Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_14\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_08.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_14\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_08.coveragexml'.
2024-07-08T07:13:11.5780249Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_30\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_24.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_30\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_24.coveragexml'.
2024-07-08T07:13:12.0053259Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_31\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_28.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_31\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_28.coveragexml'.
2024-07-08T07:13:12.0764761Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_35\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_31.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_35\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_31.coveragexml'.
2024-07-08T07:13:12.1902165Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_41\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_33.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_41\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_33.coveragexml'.
2024-07-08T07:13:12.6316985Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_43\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_38.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_11_43\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_11_38.coveragexml'.
2024-07-08T07:13:13.1082375Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_11\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_07.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_11\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_07.coveragexml'.
2024-07-08T07:13:13.1308844Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_12\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_09.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_12\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_09.coveragexml'.
2024-07-08T07:13:13.3057774Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_20.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_23\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_20.coveragexml'.
2024-07-08T07:13:13.3140310Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_29\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_23.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_29\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_23.coveragexml'.
2024-07-08T07:13:13.5776796Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_30.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_33\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_30.coveragexml'.
2024-07-08T07:13:13.7038775Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_36\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_32.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_36\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_32.coveragexml'.
2024-07-08T07:13:13.9424415Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_37\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_34.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_37\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_34.coveragexml'.
2024-07-08T07:13:13.9848414Z Converting coverage file 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_39\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_36.coverage' to 'C:\***\_work\_temp\gMSA-ADOS$_COMPUTERNAME_2024-07-08_17_12_39\In\COMPUTERNAME\gMSA-ADOS$_COMPUTERNAME_2024-07-08.17_12_36.coveragexml'.
2024-07-08T07:13:14.0307198Z Coverage report conversion completed successfully.
2024-07-08T07:13:14.0395877Z The TFS Processor has finished

but still no dice :frowning:

Hey there.

What do the logs about importing the coverage report (C# Tests Coverage Report Import [csharp]) say?

Thanks, @Colin!

Here’s the debug output:

18:43:06.258 INFO: Sensor C# Tests Coverage Report Import [csharp]
18:43:06.258 DEBUG: Analyzing coverage with wildcardPatternFileProvider with base dir 'C:\***\_work\1\.' and file separator '\'.
18:43:06.259 DEBUG: Pattern matcher extracted prefix/absolute path 'C:\***\_work\1\.' from the given pattern '**/coverage.xml'.
18:43:06.260 DEBUG: Gathering files for wildcardPattern '**\coverage.xml'.
18:43:07.820 DEBUG: Pattern matcher returns '1' files.
18:43:07.821 DEBUG: The current user dir is 'C:\***\_work\1'.
18:43:07.821 INFO: Parsing the Visual Studio coverage XML report C:\***\_work\1\.\s\coverage.xml
18:43:07.861 INFO: Adding this code coverage report to the cache for later reuse: C:\***\_work\1\.\s\coverage.xml
18:43:07.861 DEBUG: Analyzing coverage after aggregate found '0' coverage files.
18:43:07.861 DEBUG: The total number of file count statistics is '0'.
18:43:07.861 INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=1603ms

Thanks! To be honest, there are a couple of things I don’t understand about the logs (how does it parse a coverage file but then report 0 coverage files?)

My first thought is that the coverage.xml (C:\***\_work\1\.\s\coverage.xml) probably doesn’t look as expected. Is that something you can verify?

My second thought is that our scanner is supposed to be really good at picking up coverage paths on its own. Have you tried removing sonar.cs.vscoveragexml.reportsPaths. As we state here

Visual Studio code coverage

We only recommend the use of this tool when the build agent has Visual Studio Enterprise installed or when you are using an Azure DevOps Windows image for your build. In these cases, the .NET Framework scanner will automatically find the coverage output generated by the --collect "Code Coverage" parameter without the need for an explicit report path setting. It will also automatically convert the generated report to XML. No further configuration is required.

Have you tried removing this property entirely?

extraProperties: 
            sonar.cs.vscoveragexml.reportsPaths=**/coverage.xml

Well, if nothing helps, try reading the manual :face_with_spiral_eyes:

What I tested locally was completely different in the Azure DevOps environment.
The source *.coverage files were not placed in the directory where dotnet-coverage tool expected them to find, but were put in the agent’s temporary directory, and thus the resulting coverage.xml file was indeed blank:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<results />

So the fix turned out to change

      - task: DotNetCoreCLI@2
        displayName: dotnet coverage
        inputs:
          command: custom
          custom: dotnet-coverage
          arguments: merge **/*.coverage -o coverage.xml -f xml

into

      - task: DotNetCoreCLI@2
        displayName: dotnet coverage
        inputs:
          command: custom
          custom: dotnet-coverage
          arguments: merge $(Agent.TempDirectory)/**/*.coverage -o coverage.xml -f xml

Thank you, Colin.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.