Reputation: 2423
When I run OpenCover.Console.exe
, it runs tests, but code coverage is failing:
What's wrong? How to fix it?
Upvotes: 3
Views: 2379
Reputation: 248
The OpenCover version that worked for be along with -register
or -register:administrator
was 4.7.1221
. When I used 4.6.519
it didn't work.
<DebugType>Full<DebugType>
didn't change anything in my case
Upvotes: 0
Reputation: 358
On VS2022, Framework .NET 4.5, nunit3-console.exe
-register:administrator
worked for me rather than full PDB files
Upvotes: 0
Reputation: 959
Change to use -register:administrator
instead. That works for me. see https://github.com/OpenCover/opencover/issues/849#issuecomment-454058818.
Upvotes: 1
Reputation: 61
What worked for me was to remove :user from register:user. Just used register and that solved the problem.
Upvotes: 5
Reputation: 2423
Make sure that build settings Debugging information
for that project is set to Full
(Project->Properties->Build->Advanced).
The same can be done by modifying .csproj
file and adding <DebugType>Full</DebugType>
node under <PropertyGroup>
.
Source: Setting up Coveralls with OpenCover for a .NET Core project
Upvotes: 6