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?