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"
Rene schreef:
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"
Rene schreef:
Well, the Microsoft engineer just gave me some instructions on how to setup
my computer so that it can be monitored to find what is causing the problem.
Not sure how long this is going to take but I will keep posting.
You never told me if you could provide Microsoft your project so they can
troubleshoot what's going on, this may help the speedup the process.
MAF said:We created the project from 2003, and then upgraded to 2005. I have tried
to use the unlocker utility that people have mentioned on other threads
but not to any success.
Rene said:Is OK if you can't pinpoint the problem, but is it reproducible at your
will? Also, is this a project created with VS 2005 from scratch? Or did
you upgrade it from 2003?
I could never pin point the problem. Were you ever able to resolve this
issue?
Do you have a project with the problem that you would be willing to
share with the Microsoft engineer?
I am getting the same errors. Rearranging the projects might fix it
but that does not explain why the compile will work some times and not
others. If the order of the projects is invalid it shoud fail
everytime, correct?
I also tried the unlocker with no success. Does anyone have an answer
on how to get around this?
I am currently working with a Microsoft engineer trying to solve this
problem. It's been around 2 weeks and they are still trying to find
what is the cause of this problem is. They are currently escalating
the issue because the problem does not seem to have a straight answer.
Do you have a project that has the problem that you would be willing
to give to the Microsoft engineer? If you do, let me know so I can
put you in touch with the engineer and he can try to reproduce the
problem in his PC and try to narrow down the problem.
Thanks.
message Has anyone found a solution to this problem?
Frans Bouma [C# MVP] wrote:
Rene wrote:
I am sure that I am closing the application completely. It is the
Visual Studio IDE itself what is not releasing the file. This is
evident because things go back to normal when I close VS 2005 and
reopen it again.
I have been working on this project for around 2 years using VS
2003
and never had this problem happened until I started using VS
2005.
I can see my "Stop Debugging" Toolbar button (Shift + F5)
disabled as
an indication that nothing is running but I continue to get this
error. Perhaps there is some other process in the VS 2005 IDE
that
keeps holding on to the file after I stop debugging but I have no
idea what is that process.
The file name is not "xyz" but is also not a system or VS
specific
file, is one of my own. I have even deleted this file hoping that
VS
would recreate the file and snap out of the problem but
eventually it
display the error message again.
Also, a virusscanner can lock the file or windows' Indexing
service.
Be sure both aren't looking in your bin folders. This happens
because
as soon as the file is written, these services get a signal and get
into gear, grab the file and vs.net can't reference it right after
that
when it compiles a project referencing that dll just written.
FB
You're getting this error because of just what it says...the
dll is
in use by another application. Make sure that you are closing
the
application that you've compiled and run last to make sure that
the
file isn't still being accessed. Could you also please include
the
real name of the dll file that you're access...I'm guessing
it's
not really xyz.dll...that might help us figure out what
processes
might be using the dll...
Chris
--
Securing your systems is much like fighting off disease -- as
long
as you maintain basic hygiene, you're likely to be okay, but
you'll
never be invulnerable.
Steve Shah - Unix Systems Network Administrator
I keep getting the following error every time I compile the
solution under VS 2005:
----------------
Error 5
Unable to copy file "obj\Debug\xyz.dll" to
"bin\Debug\xyz.dll".
The >> process cannot access the file 'bin\Debug\xyz.dll' because
it
is being >> used by another process.
----------------
In order to get rid of this problem, I have to constantly
close
and >> restart VS 2005. Is anybody else getting the same problem?
--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET:
http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)