I\'ll be debugging a site in Visual Studio 2010 and editing an *.aspx
or *.ascx
file, and without warning, it will lock up so that I can\'t edit it
I have this problem and also have Resharper installed. Do those of you with the problem also have Resharper installed? I seem to have memory leaks in VS also that eventually bring VS to a crawl. Closing VS and re-opening it will fix the issue for a while. I have always assumed this was related to Resharper. Thoughts?
I get the same using VS2010, random file locks galore... however i find that if i close the file in question and re-open it i can continue editing i.e. i don't necessarily have to stop the whole program running.
Try refreshing project containing that file, from the solution explorer. That should re-enable editing.
As a workaround I use "Browse With..." (Right click in Solution Explorer) to load and view the page(s) when I'm making HTML refinements. You can't debug code of course but it doesn't lock the files so it makes the problem a little less irritating when making design changes.
I have replicated this issue with Windows 7, XP, both with and without source safe, MVC projects, web application projects and website project also with and without 'edit and continue' enabled i.e. I can edit the code but NOT the ASPX markup when using edit and continue!
Finally Microsoft came with a solution this year, you can download the fix here:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=40811
Using "devenv.exe /resetsettings" will restore Visual Studio back to its original factory state.
You can also use "devenv.exe /log" to log Visual Studio activity for troubleshooting:
http://msdn.microsoft.com/en-us/library/ms241272.aspx