I’m using SonarQube 8.5 (Community edition) with SonarScanner 4.4 (for MSBuild) to analyze my project (an ASP.NET application on .NET Framework 4.6).
On my local computer, I have VS 2017 Enterprise from which I generate and export coverage files (both via IDE and via batch script that invokes CodeCoverage directly).
I’ve managed to analyze my project’s code base and get the code coverage displayed in the SonarQube’s server (coverage is >0%).
Now, I’m trying to display the same results on a computer that has VS 2017 (or VS 2019) Community edition. I have the .covergexml file generated on my local computer (the Enterprise version) and SonarQube and SonarScanner are also up and running.
However, when I run the same script, the codebase is analyzed and displayed, but coverage isn’t (it remains 0%)
This is the batch script I’m using to run the analysis:
SonarScanner.MSBuild.exe begin /k:"Test" /n:"Test" /v:1.0 /d:sonar.scm.disabled=true /d:sonar.cs.vscoveragexml.reportsPaths="(AbsolutePath)\TestCoverage.coveragexml" MSBuild.exe /t:Rebuild SonarScanner.MSBuild.exe end Pause
I’ve placed that script into the root folder of my project (the same folder where the .sln file is) and the process of analysis doesn’t throw any errors. It also contains a line stating that Visual Studio coverage file is being parsed (after the rebuild step has finished)
The same script works on the computer with VS Enterprise, but not on the one with Community edition.
My question is - do I need VS Enterprise to be able to display code coverage in SonarQube, and if not, what am I doing wrong?
Thank you in advance