Could not import coverage report because 'Missing root element <results>

Template for a good new topic, formatted with Markdown:

  • ALM used GitHub
  • CI system used Github Action
  • Languages of the repository: C#
  • You can make a PR to view the workflow and logs at here

I’m using sonarcloud to show percent of code coverage but got this error

Parsing the Visual Studio coverage XML report D:\a\CityDiscoverTouristServer\CityDiscoverTouristServer\.\.\sonarqubecoverage\SonarQube.xml
WARN: Could not import coverage report '.\.\sonarqubecoverage\SonarQube.xml' because 'Missing root element <results> in D:\a\CityDiscoverTouristServer\CityDiscoverTouristServer\.\.\sonarqubecoverage\SonarQube.xml at line 2'. Troubleshooting guide: https://community.sonarsource.com/t/37151

I know it has to be something simple, but my unfamiliarity is preventing me from either seeing the problem or understanding how to fix it. Appreciate any help you can provide.

Hey there.

Did you resolve the issue? It loos like that error is no longer appearing in your logs, and that coverage is being reported.

Tks for your time Colin, I have resolved this problem by changing the coverageReportPaths to

/d:sonar.coverageReportPaths=".\sonarqubecoverage\SonarQube.xml"

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