Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

The process cannot access the file
shearer3000
#1 Posted : Monday, October 15, 2012 8:29:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 10/15/2012(UTC)
Posts: 1
Location: New Zealand

hi,

i often get an assembly/dll access issue when building a solution in visual studio or from the cmd line:

error MSB3021: Unable to copy file "myassembly.dll" to "bin\myassembly.dll".
The process cannot access the file 'bin\myassembly.dll' because it is being used by another process.

Visual studio 2010 Sp1
nCrunch 1.41.0.50b


this may not even be an nCrunch issue, but it does sound plausible that nCunch is compiling the dll at the same time VS is. Is that how it works?
Remco
#2 Posted : Monday, October 15, 2012 8:42:27 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting!

NCrunch is carefully designed to isolate projects in 'workspaces', which are effectively just directories in a different area of your hard drive. In doing so, any activity from NCrunch shouldn't interfere with your foreground solution in Visual Studio, even though builds will certainly be run throughout your usage of VS.

Generally errors like this one are a symptom caused by absolute file path references that point out of the workspace and into the original solution directory. Make sure you don't have any absolute file path references pointing to 'myassembly.dll' in your solution directory - as this can cause some messy behaviour. An easy way to find these references is usually to just run a global search over your codebase, or to try renaming your solution directory then running your tests ... most likely this will cause the offender to throw an error that you can use to track it down.

I hope this helps.


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download