dotCover commandline and scope not working

I'm running dotCover 3.0 from the commandline using mstest as testrunner. I'm trying to add a dll which isn't loaded during any of my tests, by using the Scope option. The problem is that dotCover fails to append the not loaded dll into coverage snapshot. the coverage basically fails with  "Failed to append coverage results with assemblies in specified scope." which in turn results in a report without the dlls I want to be there. I tried to log the events during cover, it seems the to be some exceptions happening:

11:06:42.366 |I| CoverageSnapshotManager       | Merging snapshots 1-2
11:06:43.141 |I| CoverageSnapshotManager       | Merge finished
11:06:43.144 |I| WorkspaceSnapshotManager      | Opening snapshot 'C:\CoverageReports\coverserver3.dcvr'. ManuallySaved
11:06:43.683 |I| WorkspaceSnapshotComplementer | Complementing snapshot 'C:\CoverageReports\coverserver3.dcvr'
11:06:44.019 |W|                               | Failed to append coverage results with assemblies in specified scope. C:\CoverageReports\coverserver3.dcvr The process cannot access the file because it is being used by another process

--- EXCEPTION #1/4 [Win32Exception]
Message = “The process cannot access the file because it is being used by another process”
ExceptionPath = Root.InnerException.InnerException.InnerException
NativeErrorCode = 32
ClassName = System.ComponentModel.Win32Exception
HResult = E_FAIL=EFail=80004005

The thing is...no other process has this file open. It seems that dotCover locks itself out or something. It's also kind of weird (I think), that the log says "Merging snapshots" since there is only one. Could just be some internal thing though. Anyone have an idea why this is happening?

3 comments

I created a repro project, and same happens there. I created a bug https://youtrack.jetbrains.com/issue/DCVR-7265. Please let me know if I either use the /Scope argument wrong or you need more information.

0

Hello Espen,

Unfortunately I can confirm that there is a bug with dotCover's Scope parameter, because of which dotCover creates a resulting snapshot in %Temp% folder but fails to copy it to the output file.
We are sorry for the inconvinience. The issue will be fixed in the nearest minor update, as soon as possible.

Thank you for the assistance. Best regards.

0

Hello Espen,
The fix was published as a part of dotCover 3.0 Update 1.
Please let us know if you'll have any issues with the new version.

0

Please sign in to leave a comment.