hi @geissbnj
To investigate further, we’d also need the verbose logs. Please add the sonar.verbose=true
property at the BEGIN step and give us the logs of the BEGIN and END steps. Like SonarScanner.MSBuild.exe begin /k:"MyProject" /d:sonar.verbose=true
.
If you don’t want to share the logs, you can look inside for the following possible issues:
At the end, it says how many reports in aggregated. If it’s 0, we need to dig into finding out why.
DEBUG: Analyzing coverage after aggregate found '0' coverage files.
DEBUG: The total number of file count statistics is '0'.
INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=1309ms
Depending on how you configure your analysis, the indexed files by the scanner may have different paths than the ones in the report. That can happen if you run the analysis from one folder (and the scanner sets a certain base directory) and generate the coverage in a separate step, in a separate folder. See this topic that had this problem.
To check which is the base path look for this log:
DEBUG: The current user dir is '<PATH>'.
To check the path of the indexed files look for this log:
DEBUG: '<PATH\FILE.cs>' indexed with language 'cs'
Then if the paths inside the coverage file differ from the path of the indexed files, look for this log:
INFO: Parsing the OpenCover report <FILE PATH>
DEBUG: Skipping file with path '<PATH\FILE.cs>' because it is not indexed or does not have the supported language.
In short: all commands need to be run from the same folder (to get the same paths).