471,319 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

Unable to Copy File

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
Jan 19 '06 #1
9 15384
Do you have multiple copies of vstudio open with a reference to this file?
MAF wrote:
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

Jan 20 '06 #2
MAF
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this file?
MAF wrote:
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


Jan 20 '06 #3
MAF
Also if I did and unloaded the second instance and the first instance should
compile correct?

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this
file?
MAF wrote:
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

Jan 20 '06 #4
You have to find out who has the DLL locked in order to start to
troubleshoot the problem. Try Unlocker or a similar utility
(http://ccollomb.free.fr/unlocker/).

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this
file?
MAF wrote:
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

Jan 20 '06 #5
Should ..... Here is an article that may help in determining who has
that file locked.

http://windowsxp.mvps.org/processlock.htm

John


MAF wrote:
Also if I did and unloaded the second instance and the first instance should
compile correct?

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this
file?
MAF wrote:
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


Jan 20 '06 #6
MAF
Even after I unlock the dll using the unlocker, I still cannot compile. The
only way I have found that will fix this is to leave the IDE and Restart the
IDE.
"Gabriel Magaña" <no*****@no-spam.com> wrote in message
news:ew*************@TK2MSFTNGP09.phx.gbl...
You have to find out who has the DLL locked in order to start to
troubleshoot the problem. Try Unlocker or a similar utility
(http://ccollomb.free.fr/unlocker/).

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this
file?
MAF wrote:
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


Jan 20 '06 #7
Very strange.... Is it the IDE that has the file locked? Can you delete
the file after unlocking by either using the unlocker's delete function or
from the Explorer? If you can successfully delete the file outside of the
VS IDE can you then compile successfully?

There might be a bug like this logged for VS2005 already, but I am not
sure...

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Even after I unlock the dll using the unlocker, I still cannot compile.
The only way I have found that will fix this is to leave the IDE and
Restart the IDE.
"Gabriel Magaña" <no*****@no-spam.com> wrote in message
news:ew*************@TK2MSFTNGP09.phx.gbl...
You have to find out who has the DLL locked in order to start to
troubleshoot the problem. Try Unlocker or a similar utility
(http://ccollomb.free.fr/unlocker/).

"MAF" <mf*****@henwoodenergy.com> wrote in message
news:eD**************@TK2MSFTNGP09.phx.gbl...
No.
"John Murray" <jm*****@pluck.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Do you have multiple copies of vstudio open with a reference to this
file?
MAF wrote:
> 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
>



Jan 20 '06 #8
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"

Jan 20 '06 #9
c0r
> if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"


Jan 20 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Oliver Spiesshofer | last post: by
3 posts views Thread by MAF | last post: by
17 posts views Thread by rdemyan via AccessMonster.com | last post: by
reply views Thread by =?Utf-8?B?R29yZG9u?= | last post: by
3 posts views Thread by =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.