VS2005 - Debug and Locked Files

  • Thread starter Thread starter JR
  • Start date Start date
J

JR

VS2005 Team Developer edition (final)
developing a Windows Application

When in debug mode if you make any changes to the application settings
or project properties, the next time I attempt to debug I get

"The operation could not be completed. The process cannot access the file
because it is being used by another process. "

If you click ok to that dialog and try to debug again I get:
"Visual Studio could not copy a support file to this location: ...blah.
Please
verify the path exists and is writeable."

The only way to start debugging again is to exit visual studio and restart.

there are no vshost.exe processes running in task manager and only one
copy of the devenv process

This is 100% repeatable.
It appears that the process that saves the settings is not releasing the
file(s) and
they remain locked. How can I prevent this because having to exit and reload
every time you modify my.settings or the project properties while in debug
mode
is a real pain.

Known bug ?
 
Did the error only occur with a particular project, or even all new
project ( Windows Application)? Can you give a sample on how you change
application settings or project properties?

Luke
 
Hi Luke
can be reproduced with any project (even a really simple one)
any time I modify the project properties, or settings.settings via the IDE
the
project vhost.exe file becomes "locked"
there is really no example it is not code causing the lock,
project properties, or edit/add an new my project settings.settings
any modification in either of these areas causes the problem

JR
 
Hello,

Are you a local administator on the computer? Also, you may check following
issue in VS.NET 2005:

1. Are you still work with a beta version?
2. in Tools/Options/Debuging, did you have following options checked:

break all processes when one process breaks
Enable Edit and Continue

Luke
 
Hi Luke
as stated in my original posting this is VS 2005 Final release
also this machine has never had a beta, it was a clean install.

answers to your new quetions
yes I am local admin (and only user of the PC)
break all processes when one process breaks is checked
Enable Edit and Continue is checked

this is pretty much an "out of the box" install
the file that is locked is always the appname.vshost.exe
I don't believe that it is permissions related as exiting the deve enviro
and restarting
allows the debug to work again, it will continue to work in the same session
until such time as I change a project property or setting.setting value
and/or add a
new settings.settings value

Thanks again
JR
 
Hi Luke,

I have tried this setting both ways with the option this option checked,
it seems to fail every time, when unchecked it works better.
I also noticed that the debug unmanaged code is not checked
I checked this and then also checked the hosting option, because it appears
from the blog you referenced that the option has advantages when turned on

so as it stands now if both of these are checked it appears to work so far,
and if none are checked it works but if only the host is checked it fails.

I will be working with this a lot more in the next few days, so will report
back
if there is any difference. But for now at least I know how to get around it

Thanks
JR
 
I am glad to hear you have had a solution here. If there is more
informations, please feel free to post here.

Regards

Luke
 

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

Back
Top