dotCover failing to Merge mutiple .dcvr files
I've got a build configuration setup with unit testing, and dotCover in the same step.
The unit tests are all running and passing as expected, but dotCover is failing to merge the report.
I'm getting this in my build log, which shows it's attempting to merge, but failing
[16:29:29]i: [Step 5/13] Searching for snapshots in the following paths: C:\BuildAgent\temp\agentTmp
[16:29:29]i: [Step 5/13] Found 9 snapshots
[16:29:29]i: [Step 5/13] dotCover merge command settings
[16:29:29]i: [dotCover merge command settings] Sources:
C:\BuildAgent\temp\agentTmp\1.dcvr
C:\BuildAgent\temp\agentTmp\2.dcvr
C:\BuildAgent\temp\agentTmp\3.dcvr
C:\BuildAgent\temp\agentTmp\4.dcvr
C:\BuildAgent\temp\agentTmp\5.dcvr
C:\BuildAgent\temp\agentTmp\6.dcvr
C:\BuildAgent\temp\agentTmp\7.dcvr
C:\BuildAgent\temp\agentTmp\8.dcvr
C:\BuildAgent\temp\agentTmp\9.dcvr
Output:
C:\BuildAgent\temp\agentTmp\outputSnapshot_dotnet.dcvr
[16:29:29]E: [Step 5/13] dotCover merge (1s)
[16:29:29] : [dotCover merge] Starting: "C:\Program Files\dotnet\dotnet.exe" C:\BuildAgent\tools\JetBrains.dotCover.CommandLineTools.bundled\dotCover.dll merge C:\BuildAgent\temp\agentTmp\1merge_dotCover.xml
[16:29:29] : [dotCover merge] Starting: C:\BuildAgent\tools\JetBrains.dotCover.CommandLineTools.bundled\dotCover.dll merge C:\BuildAgent\temp\agentTmp\1merge_dotCover.xml
[16:29:29] : [dotCover merge] in directory: C:\BuildAgent\work\4fb085f6dce9093a
[16:29:29] : [dotCover merge] JetBrains dotCover Console Runner 2025.1.7. Build 20250902.233119 (windows-x64)
[16:29:29] : [dotCover merge] Copyright (c) 2009-2026 JetBrains s.r.o. All rights reserved.
[16:29:30] : [dotCover merge] [JetBrains dotCover] Snapshot merging started. Source snapshots number: 9 [09/11/2026 16:29:30]
[16:29:30] : [dotCover merge] Merging snapshots 1-5
[16:29:30]E: [dotCover merge] [JetBrains dotCover] Failed to merge snapshots. The given key '00000096' was not present in the dictionary.
[16:29:30]W: [dotCover merge] Process exited with code 1
[16:29:30]W: [Step 5/13] The dotCover report was not generated. Snapshot file not found
This means that the build output does not contain a working coverage report. I've tried with both Console runner 2025.1.7 and 2025.1.9. As well as checking for an update before posting this message.
Please sign in to leave a comment.
Hi. This looks like a known dotCover bug, DCVR-12528. Other users report it there with dotCover 2025.1.7 and 2025.1.9 in TeamCity.
DCVR-12528 is marked as fixed in dotCover 2025.2, but TeamCity does not support dotCover 2025.2 or newer yet. TW-95680 tracks that support, and DCVR-13607 requests the fix for dotCover 2025.1. Both issues are still open without an ETA at the time of writing. Please upvote those to get notified of any updates. If the fix is scheduled for a version, each issue will show that version.
DCVR-12528 lists a workaround for builds that use a .NET 10 SDK. Users there report that the merge works with .NET SDK 10.0.100 and fails with later .NET 10 SDK versions. I haven't had a chance to test this workaround, and none of those reports names dotCover 2025.1.7 or 2025.1.9. To try the workaround:
global.jsonfile of your repository. If the repository has no such file, create it in the root directory.With this section, every
dotnetcommand in the repository uses .NET SDK 10.0.100 and fails on an agent without it. Does the workaround help in your case?If the build does not use a .NET 10 SDK, or the workaround does not help, collect a dotCover log: