"The process cannot access the file" error

Hi,

I am trying ReSharper 3.0.468 and get the following error when debugging my unit tests:

System.IO.IOException occurred
Message="The process cannot access the file 'C:
Program Files
ReSharper
v3.0
vs8.0
Bin
DevExpress.Data.v7.1.dll' because it is being used by another process."
Source="mscorlib"
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.FileInfo.Open(FileMode mode, FileAccess access)
at JetBrains.ReSharper.TaskRunnerFramework.AssemblyLoader.isManaged(String path) in c:\Agent\work\Server\ReSharper-3.0\src\TaskRunnerFramework\src\AssemblyLoader.cs:line 111

If I run my unit tests without debugging then they run fine.

Thanks

SurfRat

4 comments
Comment actions Permalink

Hello Surf,

It's not an error. It is an exception that is caught later by ReSharper's
test running subsystem. You can see these exceptions if you selected "when
thrown" in exceptions dialog, i.e. debugger intercepts exception at the moment
it is thrown regardless if it is caught later.

So, this is not a bug.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


S> Hi,
S>
S> I am trying ReSharper 3.0.468 and get the following error when
S> debugging my unit tests:
S>
S> System.IO.IOException occurred
S> Message="The process cannot access the file 'C:
Program
S> Files
ReSharper
v3.0
vs8.0
Bin
DevExpress.Data.v7.1.dll' because
S> it is being used by another process."
S> Source="mscorlib"
S> StackTrace:
S> at System.IO.__Error.WinIOError(Int32 errorCode, String
S> maybeFullPath)
S> at System.IO.FileStream.Init(String path, FileMode mode,
S> FileAccess access, Int32 rights, Boolean useRights, FileShare share,
S> Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs,
S> String msgPath, Boolean bFromProxy)
S> at System.IO.FileStream..ctor(String path, FileMode mode,
S> FileAccess access, FileShare share)
S> at System.IO.FileInfo.Open(FileMode mode, FileAccess access)
S> at
S> JetBrains.ReSharper.TaskRunnerFramework.AssemblyLoader.isManaged(Stri
S> ng path) in
S> c:\Agent\work\Server\ReSharper-3.0\src\TaskRunnerFramework\src\Assemb
S> lyLoader.cs:line 111
S> If I run my unit tests without debugging then they run fine.
S>
S> Thanks
S>
S> SurfRat
S>


0
Comment actions Permalink

Hi,

Thanks very much. That sorted my problem out.

SurfRat.

0
Comment actions Permalink

Is there any way you can avoid making the exception happen? It's the bain of our lives and ruins debugging tests through resharper. Every version of resharper seems to be infected with this nastyness. We're reverting back to writing main methods when we need to debug tests.
Please please please fix this? (P.s. Team City rocks, looking forward to R#v4 but this is more important)
The process cannot access the file 'C:\Program Files\JetBrains\ReSharper\v3.1\vs9.0\Bin\DevExpress.Data.v7.1.dll' because it is being used by another process. ]]>

0
Comment actions Permalink

For those affected by this unchecking the System.IO.IOException from the 'Thrown' column in the exceptions screen is a workaround until they stop throwing and catching this exception.

0

Please sign in to leave a comment.