dotCover is not showing Code Coverage
Symptoms
The assemblies you are trying to cover are not present in the coverage report or have 0% coverage.
Possible cause
- dotCover is unable to find assemblies’ PDB files.
- Assemblies’ PDB files do not match corresponding DLL files. For example:
- the files were created by different builds;
- DLL files were obfuscated.
Solution
dotCover integrated in Visual Studio
- Disable solution structure matching in the coverage results toolbar:
- Check that your target assemblies are built with PDBs.
- Check that the results are not filtered out with coverage filters (see dotCover | Edit Coverage Filters in the main menu).
- In ReSharper | Options… | Tools | Unit Testing, disable Shadow-copy assemblies being tested.
- Try to Drop coverage data with a trash bin icon
dotCover console runner
- Check that your target assemblies are built with PDBs.
- Check that the results are not filtered out with coverage filters.
(NUnit) Disable shadow-copying by running coverage with an additional /noshadow argument.
Please sign in to leave a comment.
I see issues with dotCover when you mix different framework targets in one solution. I had assemblies for .net core 3.1 and 3.0. dotCover doesn't show any test coverage for 3.0 assembly. After change to the same target for all assemblies it works again.
Had the same issue, solved it by invalidating the cache.
File -> Invalidate caches...
File | Settings | dotCover | Highlighting and check the 'Enable Highlighting' checkbox.
I have had to enable this after updates it gets unchecked sometimes.