Code Coverage not converting .coverage file to .coveragexml

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Community 10.0.0.68432

  • how is SonarQube deployed: zip, Docker, Helm
    pipeline is in ADO, SQ is Local, agent is local

  • what are you trying to achieve
    Uploading of coverage reports to SQ

  • what have you tried so far to achieve this
    Using VS Test platform installer, have confirmed that coverage files are getting generated and getting the below error when trying to convert to XML. I have opened the coverage file in VS 2017 to confirm it is valid and If I go out to the agent and run the codecoverage exe shown in the log with the same parameters, it will generate the coverage file.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Copyright (c) Microsoft Corporation.  All rights reserved.




CodeCoverage.exe is deprecated. Use dotnet-coverage global tool or Microsoft.CodeCoverage.Console instead. Some features of CodeCoverage.exe will be removed in next release of Visual Studio.



Usage: CodeCoverage <command>





Process returned exit code -1
Coverage report conversion completed successfully.
##[error]Failed to convert the binary code coverage reports to XML. No code coverage information will be uploaded to the server (SonarQube/SonarCloud).
Failed to convert the binary code coverage reports to XML. No code coverage information will be uploaded to the server (SonarQube/SonarCloud).
##[error]Check that the downloaded code coverage file (D:\agent01\_work\_temp\TestResults\9b4b8bcd-aa0e-4e32-b152-956eb2432ee4\buildadmin01_APPPRD02BLD_2024-02-23.13_17_01.coverage) is valid by opening it in Visual Studio. If it is not, check that the internet security settings on the build machine allow files to be downloaded from the Team Foundation Server machine.
Check that the downloaded code coverage file (D:\agent01\_work\_temp\TestResults\9b4b8bcd-aa0e-4e32-b152-956eb2432ee4\buildadmin01_APPPRD02BLD_2024-02-23.13_17_01.coverage) is valid by opening it in Visual Studio. If it is not, check that the internet security settings on the build machine allow files to be downloaded from the Team Foundation Server machine.
The TFS Processor has finished
Calling the SonarScanner CLI...
INFO: Scanner configuration file: D:\agent01\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.19.0\classic-sonar-scanner-msbuild\sonar-scanner-4.8.1.3023\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\agent01\_work\146\.sonarqube\out\sonar-project.properties
INFO: SonarScanner 4.8.1.3023
INFO: Java 17.0.10 Oracle Corporation (64-bit)
INFO: Windows Server 2012 R2 6.3 amd64

Hi,

Welcome to the community!

CodeCoverage.exe is not something we own. You’ll need to talk to… MicroSoft? about that.

As as side note, the current SonarQube version is 10.4 (10.4.1 should be released today) and version 4.8.1 of SonarScanner has some age on it too, at this point. The current version is 5.0.1. You should upgrade at your earliest convenience.

 
HTH,
Ann