According to https://community.sonarsource.com/t/coverage-troubleshooting-guide-for-net-code-coverage-import/37151,
We support the following code coverage tools:
* Visual Studio Code Coverage
* dotCover
* OpenCover/Coverlet
However, OpenCover is depreciated (ref. https://github.com/OpenCover/opencover). Please add support for AltCover to replace OpenCover.
Hi Lindsay
Thanks for the suggestion we will consider it. Have you tried Coverlet? If so, do you see an advantage of AltCover over Coverlet?
Thanks
Tom
I did try to use Coverlet, and I couldn’t get it to integrate with SonarCloud. I had to switch to OpenCover to integrate.
Hi Lindsey
If you let me know the problems you encountered with Coverlet, I’d be happy to take a look and see if we can help. I appreciate setting up coverage isn’t always as easy as it should be.
Tom
@Tom_Howlett : After adding coverlet.msbuild to solution. Solution starts giving below error:
“The expression “[System.Version]::Parse(’’)” cannot be evaluated. Version string portion was too short or too long. Application\NugetPackages\coverlet.msbuild.3.0.3\build\coverlet.msbuild.targets”.
Similar Issues: .NET Framework/NUnit: The expression "[System.Version]::Parse('')" cannot be evaluated · Issue #1119 · coverlet-coverage/coverlet · GitHub
Problem with run coverlet.msbuild on .net framework project · Issue #1219 · coverlet-coverage/coverlet · GitHub
Hi Aditya, welcome to the community
I guess you are not using the SDK style projects that Coverlet supports? If you are using the older project type then you’ll need to try one of the other options available.
Thanks
Tom