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 NCrunch Developer
#2983
15 Oct 2012 20:42 UTC
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
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
Post a reply
Log in to reply.