Can sonar read multiple coverage reports from one project

Can someone tell me if it is possible to use multiple coverage reports with the following command:

/d:sonar.cs.opencover.reportsPaths=.\firstFolder\coverage.xml, .\secondFolder\coverage.xml

I am using this but getting an error:

Unrecognized command line argument: .\secondFolder\coverage.xml
Expecting at least the following command line argument:
- SonarQube project key
When connecting to a SonarQube server earlier than version 6.1, the following command line arguments are also required:
- SonarQube project name
- SonarQube project version
The full path to a settings file can also be supplied. If it is not supplied, the exe will attempt to locate a default settings file in the same directory as the SonarQube Scanner for MSBuild.
Use ‘/?’ or ‘/h’ to see the help message.
Pre-processing failed. Exit code: 1

Hey there.

Multiple reports are allowed, but you should not include a space between the values

/d:sonar.cs.opencover.reportsPaths=.\firstFolder\coverage.xml,.\secondFolder\coverage.xml

1 Like

Thank you. That worked.