Unable to import Coverage from VisualStudio - Error while parsing XML file

David,

I see two potential issues:

  1. You should make sure you’re passing a .coveragexml file to sonar.cs.vscoveragexml.reportsPaths, the one that appears to be produced in the very last step before SonarScanner.MSBuild.exe end. It looks like you are passing a .coverage file, which SonarQube would have a hard time parsing if it thinks it should be parsing XML.
  2. Your report path has a space in it, and I have seen some other posts on this forum where that has been identified as potentially causing an issue importing code coverage reports.

Colin

1 Like