You should try following link that worked for me. It says Gallio error but it is using OpenCover to run the coverage. I was using Gallio with Sonar and running OpenCover and using these steps fixed my issue.
How to use OpenCover plugin Visual Studio 2010
-
29-09-2022 - |
Question
I tried to generate code coverage xml file. but i failed
after adding the Nuget packages and enabled Nuget Package Restore on the solution. then open cmd and run this command .\packages\OpenCover.4.5.1604\OpenCover.Console.exe^ -register:user^ -target:MSTest.exe^ -targetargs:"/noresults /noisolation /testcontainer:..\releases\Latest\NET40\MonitoredUndoTests.dll"^ -filter:+[]^ -output:.\report\output.xml
but always generate an error
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow