DotCover Match coverage results with current project structure randomly failing

In Visual Studio 2022 17.12.21 and Visual Studio 2026 18.7.2, with DotCover 2026.1.20260613.213900, we face the problem, that the dotCover-tab does not always match coverage results with current project structure.
It seems to happen at random if it works or not. When it works, the toggle switches between the two views as expected. When it doesn't, it stays at the unmatched version.
It does not seem to have to do with loading VS and waiting to view the tab.
Clearing the coverage data and running anew definitely breaks the view.

1
3 comments

Thanks for contacting JetBrains support. 

To help us investigate the issue, could you please provide the following details:

  • Regarding “does not always match coverage results with current project structure”, do you mean the coverage report is missing some code path? 
  • Screenshot of the issue
  • Follow How to get dotCover logs  to capture dotCover logs("dotcover core" log is not required at this time).
  • Exact version of the test framework you're using.
  • If possible, a copy of your .csproj file, which would help us reproduce the scenario on our end.

You can upload the files to the Upload Service and share the Upload ID.

 

0

Upload id: 2026_07_03_23EF9CUkdX9roupbmbKAda (files: JetLogs.zip and 2 more)

I managed to get the bug. I started Visual Studio and the DotCover tab looked like “Working with Toggle On.png” (Excuse the colors, screenshots were from different computers, but you get the idea). Then I cleaned it and ran a tiny cover on a randomly picked unittest. The new data showed up as “Not working with toggle on.png”.
That's what I meant with “does not always match coverage results with current project structure”, sometimes I get the correct view, tidied folders, but most of the time it's broken and the toggle (The title is almost its name) does not work, only showing the Namespace like view

0

Thanks for the logs. The issue should stem from the exception below:

Unknown inheritor from base type 'JetBrains.Util.Dotnet.TargetFrameworkIds.TargetFrameworkId', RdId = 4354288382876863750. All types which participate in RdReflection communications should be explicitly known to TypeCatalog., reason: System.Collections.Generic.KeyNotFoundException: Unknown inheritor from base type 'JetBrains.Util.Dotnet.TargetFrameworkIds.TargetFrameworkId', RdId = 4354288382876863750. All types which participate in RdReflection communications should be explicitly known to TypeCatalog.

It is the same root cause of this known issue: DCVR-13508 No code highlighting when targeting OS-specific TFMs. It happens when OS-specific TFM is used. In this case, the logs show that "net8.0-windows8.0" is used. Currently, this issue is actively tracked in our system, but there is no ETA for a fix yet. Please upvote and subscribe to receive updates. 
 
While waiting for the fix, you may use the following workaround: downgrade ReSharper to 2025.3 or change the target framework to "net8.0". 

 

0

Please sign in to leave a comment.