Reputation: 24368
Visual Studio freezes up continually when I'm editing master pages or aspx files. Here's what I've tried that have not helped:
I don't have tons of files - 3 Master pages and maybe 30 aspx files. It is a asp.net mvc project. All I have to do to get VS to freeze is type a little text or even just paste. The freezing lasts a good 5-10 seconds. My machine has 4GB of RAM and fast disks.
Could it have anything to do with asp.net mvc? Would the amount and size of other projects in the solution affect the editor?
Upvotes: 17
Views: 9347
Reputation: 1
Try deleting ReflectedSchemas folder (C:\Documents and Settings[username]\Application Data\Microsoft\VisualStudio\9.0\ReflectedSchemas). This folder grows quickly (mine was 2.6 GB after 4 years of programming) and by growing can slow down the VS considerably. Such as 10-20 seconds of non-responsive UI after closing an aspx or ascx file. I has not waiting them to open, I was waiting to close. Apparently the opening was easy, the closing part was the hard job!
Upvotes: 0
Reputation: 400
Interesting, the uninstall of the "Visual Studio Web Authoring" program and the renaming of the Office setup.exe seem to both be related. I watched setup.exe as I uninstalled Web Authoring and the uninstall had the side effect of removing setup.exe and all the other contents of the directory. Also, when I had my setup.exe renamed to something else (e.g. 'setup.exe.renamed') then I had errors trying to uninstall Web Authoring. Those errors went away when I renamed setup.exe.renamed back to setup.exe. Anyway, just saving someone else a double effort here.
Upvotes: 0
Reputation: 4530
I had a similar problem where Visual Studio would just hang indefinitely when opening a master page file. I solved it by opening the master page file in notepad +, removing the html, then putting it back in from visual studio.
Hope this helps someone!
Upvotes: 0
Reputation: 31
I finally figured out what the problem was with mine. I had a protocol relative script reference in my masterpage that was reeking havick on my editor. Hopefully a bug microsoft will fix soon.
Here is what I had:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
type="text/javascript"></script>
What I had to do to fix it:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
type="text/javascript"></script>
Hope that helps someone
Upvotes: 3
Reputation: 11
With VS2005 I found the problem to be with a link to a javascript file (that was in a master page) that I entered as
<script src="../../js/file.js" type="text/javascript" />
when I change this to just <script src="/js/file.js" ... >
the problem went away.
NOTE while this "bad link" was in the master page, VS2005 hung even when I did not have the masterpage as an open document. Basically as soon as I tried to edit anything (or even build the app) VS hung. I had to close VS, change the offending file in note pad and open VS again. Then all was good.
The very odd thing was I added this link to the file last night and VS was still behaving ok, it was not until this morning after a restart that the file caused the problem.
I Hope this helps someone Derek
Upvotes: 1
Reputation: 5332
I am not sure if this is going to help anybody but after trying all the answers here to no avail I deleted a huge block of commented code on my ASPX page and the behavior went away. I am not really sure why a large commented block of code would cause VS to freeze up after every edit action but that seems to be what happened.
Upvotes: 0
Reputation: 246
I Solved this problem by uninstalling 'Microsoft Visual Studio Web Authoring Component' from my machine. It can be uninstalled from 'Add/Remove Programs' option in Control Panel. What a nightmare!
Now everything works just like its supposed to. I'm surprised Microsoft couldn't figure out what the problem and solution is. How much do they spend on R&D and Q/A again?????
Hope this helps others.
Upvotes: 23
Reputation:
I had the same problem when I removed Office 2007 to install Office 2010 beta. I have installed Office 2010 64 bits on Windows 7
I used Robert MacLean's solution, and it works for me, I just renamed the file.
Upvotes: 0
Reputation: 37633
I got the sampe problem with Visual Studio 2008 SP1. And yeah it was a masterpage as well. The solution what I found is to restart Visual Studio 2008 and use the source mode of ASPX file :)
I guess the problem here is a masterpage.
Upvotes: 0
Reputation: 3891
It can also happen if you have markup problems.
For instance, if you have a Label control and add something like Text="<%# TranslateLabel("lblSearch") %>"
the page will freeze even in source mode when attempting to save it. The correct sintax should be Text='<%# TranslateLabel("lblSearch") %>'
. I know it is not your problem, but maybe it's useful for somebody else...
Upvotes: 1
Reputation:
rename worked for me i.e. changed setup.exe to setiup.exe.old
C:\Program Files (x86)\Common Files\microsoft shared\ OFFICE12\Office Setup Controller\Setup.exe
wish i'd found this article first - it has taken me many man hours
thx -j
Upvotes: 0
Reputation:
I have been having this problem off and on for a few weeks. I finally resolved it today. The source (nice pun) of the problem was source control. I am currently using Visual Source Safe 2005 (I know, I'm dumping it soon), but I think it could be an issue with any source control package.
I first suspected VSS when I was able to edit ASPX pages in the design view without issue using a machine that was not connected to VSS. If I removed source control from the project, everything worked fine.
I then discovered that somehow my VSS connection settings got changed from using a folder connection to a web connection. I'm not sure how this could have happened since I am the only one that uses VSS and I certainly didn't change it. Anyway, I reset it back and everything began to work normally again.
Upvotes: 0
Reputation: 39261
I had a similar issue and found an article about the problem, rather than reinstall Office to check, I simply renamed the setup.exe to setup.exe.old and that resolved it.
Upvotes: 9
Reputation: 203
I'm not sure about that, but I guess that if you're having a lot of (probably huge) projects in the solution, this would definitely slow down VS for it parses the code to give you an up-to-date intellisence menu ... Master pages are a little slow anyway, especially that VS is not that fast on rendering the HTML elements, not to mention Master pages.
Upvotes: 1