rafek
rafek

Reputation: 5480

Visual Studio 2008 hangs while opening aspx/ascx file

I've issue with VS08. I've got Web Application project (vb.net). Whenever I try to open an aspx or ascx (in Source view - just double clicking on Solution Explorer) the file opens, but VS hangs and is not responding. The only way to restart VS is then by killing it's process. And it happens all the time with these types of files. :/ Reinstall didn't work.

In addition, the only plugin I've installed with this instance of VS is ClearCase source control plugin.

Upvotes: 11

Views: 8679

Answers (10)

Yogi
Yogi

Reputation: 7184

An old question, but I bumped into it this week and want to post Microsoft's suggested solution.

ROOT CAUSE

The root cause of this problem is that Office 2007 and the VS 2008 web designer both share a component, 32-bit MSXML5. When Office 2007 uninstalls or gets upgraded, MSXML5 is removed yet Visual Studio still needs it.

WORKAROUND

Workaround if you manually uninstalled Office 2007 AND have a non-Express version of VS 2008. Uninstall and then reinstall “Microsoft Visual Studio Web Authoring Component“. Next run WCU\WebDesignerCore\WebDesignerCore.exe from the install disk.

For more information see MS article:

Upgrade or Uninstall of Office 2007 might cause VS 2008 Web designer to hang

Upvotes: 1

user1266064
user1266064

Reputation: 11

I was having the same problem... Designer pages when opened hanged the VS. I use VS2008 SP1. I had installed Office 2010 AND UPON GOOGLING I FOUND THAT MICROSOFT VISUAL STUDIO WEB AUTORING COMPPONENT needed to be repaired.

If you install VS 2008 Beta on a clean machine, you will find Microsoft Visual Studio Web Authoring Component in the list of installed programs. You will also find that Program Files\Microsoft Web Designer Tools\Office12 and Program Files\Common Files\microsoft shared\OFFICE12 folders with some Office 2007 components even if you don't have Office 2007 installed.

What is Microsoft Visual Studio Web Authoring Component and why does it install Office 2007 components on my machine? The answer is that it is new HTML/ASP.NET design surface that is based on former FrontPages technologies, similar to Expression Web Designer. The designer was made into a separate component, but it was hard to fully separate code from Office libraries. So in VS 2008 designer is installed using separate setup which also installs a few Office libraries the designer relies upon. This means you will get Office 2007 updates offered to you via Microsoft Update although technically you don't have Office 2007 installed. This is because Microsoft Update recognizes shared components and will offer you related updates, so don't be alarmed or surprised. Office 2007 components are fully compatible with Office 2007 so you can freely install and uninstall Office 2007 or VS 2008 and both systems will continue working correctly. Designer is also compatible with Office 2003 and should not be affecting Office 2003 applications. If you observe any disrepancies, please report bug via Microsoft Connect ASAP and we will definitely investigate the issue.

The component can be installed/uninstalled/updated separately. Setup is located on VS DVD in WCU\WebToolsCore folder. If you accidentally uninstalled the component, you can simply run WebToolsCore.exe from the abovementioned folder. The setup does not have UI, simply give it about 5-10 minutes to complete.

Upvotes: 1

usman
usman

Reputation: 21

There are many cases which may cause your vs2008 to hang. The only experience that caused my VS2008 to hang was right after installing Office2010. Once it happens, the only workaround is to kill Visual Studio in Task Manager. The root cause of this problem is that Office 2007 and the VS 2008 web designer both share a component, 32-bit MSXML5. When Office 2007 uninstalls or gets upgraded ie office2010, MSXML5 is removed yet Visual Studio still needs it.

There are many ways to fix this particular issue

1 - uninstalling Office 2010 and rebooting your machine; the issues will be resolved. 2 - if you still insist on using office 2010 (which will eventually happen) then go to your programs and right click on Microsoft Visual Studio Web Authoring tool and click on repair. 3 - You can simply remove Microsoft Visual Studio Web authoring Component completely from programs. Reinstall "Microsoft Visual Studio Web Authoring Component" from the VS2008 used. You can find the Web core designer from this particular path of your visual studio:

WCU\WebDesignerCore folder and run WebDesignerCore.exe

4 - If you are still experiencing some more issues the link below should sort it out

http://blogs.msdn.com/b/webdevtools/archive/2010/04/19/upgrade-or-uninstall-of-office-2007-might-cause-vs-2008-web-designer-to-hang.aspx

Upvotes: 2

Viktor Einarsson
Viktor Einarsson

Reputation: 191

This clearly looks like a problem with the "Microsoft Visual Studio Web authoring Component" program. Simply pressing Change from Programs and selecting Repair fixed the issue for me. Now I can use the design look also. This happened for me when I installed Office 2010.

Upvotes: 19

Tiago Dias
Tiago Dias

Reputation: 585

You should try to remove "Microsoft Visual Studio Web authoring Component" (from Programs). I had the same problem and removed this component of Visual Studio (more about it here). You'll loose the visual designer but VS won't hang anymore.

Upvotes: 5

Mxyzptlk
Mxyzptlk

Reputation: 536

If you don't use the ClearCase plugin do you still get the problem?

i.e. Try saving copying your solution to your local machine, remove all the source control bindings and see if you get the same problem.

Depending on how your environment is set up, you could be looking at a lag when VB is communicating with ClearCase.

And if all else fails, there are a few good diagnostic tools from the old SysInternal suite to help you figure out if it is a file access, registry or network problem.

SysInternals Site
FileMon - File reads / writes
RegMon - Registry reads / writes
TCPView - Network traffic

Upvotes: 0

Juozas Kontvainis
Juozas Kontvainis

Reputation: 9597

You can try opening using other Visual Studio editor (right-click on the file, Choose Open With...)

Upvotes: 2

rafek
rafek

Reputation: 5480

Turning off Html Validation didn't work. What I've noticed that before opening .aspx/.ascx file in solution memory usage (of VS) is for example 50k and when I double click i.e. Default.aspx to view Source then memory usage goes up to for example 150k and VS is not responding.

Everything did work last week. :/

Upvotes: 1

Rob Kent
Rob Kent

Reputation: 5193

Wild shot, but try turning off Html Validation in Options. There was an issue with that at some point.

Upvotes: 1

Paul Suart
Paul Suart

Reputation: 6713

It could be a problem with the "Solution User Options" file (.suo) that lives in the same folder as the solution (.sln) file.

Try checking everything in, closing visual stuido, deleting this file and restarting.

May or may not help - you might not even have a solution after all!


Alternatively, are you using any anti-virus software? Commonly AV is set-up to check files as they are accessed. I seem to remember having issues with ours a while back, and stopping it checking files within my solution helped.

If you use Sophos I can help further, otherwise try stopping your AV scanning your solution's files.

Upvotes: 2

Related Questions