Unable to copy file

M

MAF

Does anyone know why in 2005 I might be getting this error everytime I try
and recompile?

Error 226 Unable to copy file "obj\Debug\myfile.dll" to
"bin\Debug\myfile.dll". The process cannot access the file
'bin\Debug\myfile.dll' because it is being used by another process. myfile
 
M

Michael Nemtsev

Hello MAF,

Seems that u have already runned instance of app that using this file
Use ProcessExplorer (www.sysinternals.com) to find the handle owner for this
dll and close it

M> Does anyone know why in 2005 I might be getting this error everytime
M> I try and recompile?
M>
M> Error 226 Unable to copy file "obj\Debug\myfile.dll" to
M> "bin\Debug\myfile.dll". The process cannot access the file
M> 'bin\Debug\myfile.dll' because it is being used by another process.
M> myfile
M>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
C

c0r

VS only locks one version of the file, and you CAN rename/move it.
You can use the following commands in the pre-build event of the
problem-project to workaround the problem:

if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if not exist "$(TargetPath).locked" move "$(TargetPath)"
"$(TargetPath).locked"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top