views:

3525

answers:

14

Upgraded from MVC Beta to MVC RC1. Re-pointed all references in the project to point to the new assemblies Rebooted Everything compiles (and runs!) But...

Opening a view (.aspx) in VS and she just dissapears! Event Viewer gives: NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (6E075E00) (80131506)

Update 1: Not ALL .aspx pages!

Also - it seems that writing the question on StackOverflow is the fix! grr

Update 2: Not had the problem since posting the question but: The only plugins I have are VisualSVN and Resharper. I do seem to have something in the GAC for System.Web.Mvc - but it looks like the wrong version and I can't get rid of it.

I believe it must be related to some intelli-sense colouring or similar during the render of the code of the .aspx page - but now it's stopped it is hard to confirm...

+2  A: 

I've had problems like that before. It was the webform editor. If you right-click the aspx file and choose "open with..." and select Html-editor the ide will most likely not crash on you.

Try disabling addIns one by one.

For me it was a conflict between gallio and testdriven.net I think.

Christian Dalager
This didn't work for me, but choosing Open With... "Source Code (Text) Editor" did. It isn't ideal, but it is a good work around since I can't get or install the hotfix.
Code Commander
A: 

I got the exact same error. At first I thought it was the Spark View Engine add-in (because it crashed opening views) but after Christian's comment about Gallio and TestDriven.NET (I have both) I uninstalled Gallio and now it works.

Ryan Montgomery
+5  A: 

I had to remove the PowerCommands add-in to get VS working again.

martijnboland
+1  A: 

I'm having the same problem and have posted a reply on the official ASP.NET MVC forum at http://forums.asp.net/t/1378448.aspx

I'm not sure, but are you also seeing reference to the Html helpers not showing up in the views (when they don't crash)?

I don't have Gallio installed, but I do have Resharper. I'll see if disabling that helps (although that would cause me a lot of anguish).

Update: Resharper wasn't the issue, but rather the plugin "Huagati DBML/EDMX Tools." It seems some plugins might be conflicting and I encourage people to disable all plugins as a preliminary step in debugging the crashes.

Brian Vallelunga
+10  A: 

There are some framework bugs that affect all VS add-ins etc if they reference System.Core v3.5. Start by clearing out the NGen cache. "ngen update", "ngen /delete [assemblyname]" or a sweeping "ngen /delete *" usually does the trick

More details + workarounds for this (and/or similar) issues here:

http://forum.huagati.com/topic5-addin-causes-ide-to-close.aspx

http://code.msdn.microsoft.com/PowerCommands/WorkItem/View.aspx?WorkItemId=8

http://www.jetbrains.net/devnet/thread/274657

Update: finally someone from MSFT acknowledge that there is a problem: http://blogs.msdn.com/jnak/archive/2009/02/15/potential-crash-in-vs-when-using-the-mvc-rc-on-windows-azure.aspx

Update 2: An attempt at a workaround (VS2008 add-in): http://www.huagati.com/ProjectLoader/

Update 3: Microsoft has a CLR patch (KB963676) that fixes this problem. It is not available for download from microsoft.com but it can be requested through MSFT support / PSS.

Update 4: The CLR patch is now available for download from Microsoft Connect:

https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&wa=wsignin1.0

http://blogs.msdn.com/jnak/archive/2009/02/26/fix-available-asp-net-mvc-rc-crash-in-a-windows-azure-cloud-service-project.aspx

KristoferA - Huagati.com
the patch also worked for wpf designer crashes
Entrodus
Thank you for this...fixed a very frustrating crash for me.
womp
A: 

The problem was indeed, powercommands for VS 2008. Uninstall them if you can live without them and the aspx pages/designers will open fine.

Christopher
A: 

Actually I think my problem was some rogue copies of the Beta MVC DLLs hanging around.

I deleted them all, uninstalled the RC1 and made sure they all left the GAC and then reinstalled the RC1. So far everything seems fine.

Ronnie
+27  A: 

Try removing all bin/obj directories, and clearing your Temporary ASP.NET Files and %TEMP% directories. Then issue the following commands from a VS2008 command prompt:

ngen /delete System.Web.Mvc
ngen /delete System.Web.Abstractions
ngen update

Also ensure that all your references (MvcContrib, anything else built against MVC) are pointing to the same version of MVC as all the others.

This seems to have worked for me (so far)

spmason
When running 64 bit then you need to clean out the 64 bit ngen'd files too - there is a 64 bit version in \windows\Microsoft.NET\framework64. Also it seemed sensible to do System.Web.Routing and Microsoft.Web.MVC
Ronnie
Well it's over a week later, and even spending a lot of time in VS across several projects it hasn't crashed once since I did this.I even re-installed PowerCommands which has been crashing for me since the Preview 4 days and everything is running smoothly.
spmason
The following worked for me, (I had to run it in the following directory otherwise it acted like it worked but it didn't, C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\)ngen /delete *ngen update
Blegger
This worked for me, thanks for posting this :)
Vin
It's works also when you are switching from MVC 1 to MVC 2.0
Gabriel Mongeon
+4  A: 

Microsoft have now released a hotfix to resolve this issue.

See https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=16827&wa=wsignin1.0

Phil Haack elaborates further here - http://haacked.com/archive/2009/03/06/hotfix-for-installing-aspnetmvc.aspx

berko
+1  A: 

Although I found the suggestions on this page helpful they still didn't resolve my VS crash/restart problem.

After 2 days I finally found the solution to my problem, hopefully it'll help someone else:

http://www.chowamigo.co.uk/2009/10/fix-visual-studio-hangs-crashes-and.html

A: 

This occurred for me after setting the reference to System.Web.Mvc to Copy Local = True. This placed the System.Web.Mvc.dll file in my bin folder.

The next time I opened any aspx pages Visual Studio crashed. Changing the dll in the bin to System.Web.Mvc.dll.bak fixed the problem.

Gavin Miller
A: 

I have found that any compile issues with the master page or the page itself -- even warnings -- can cause this to happen. So close the project, delete the bin and obj directories, then re-open the project. Next open your master page(s) and any other recently changed aspx/ascx files. It is important to open all before you compile.

Now, viewing each page one at a time, compile the project and resolve the warnings. Once all the warnings are resolved, close the pages and try to re-open them.

kvnpttrsn
A: 

I finally (after a fews days of trying everything) got it resolved by uninstalling the Spark View Engine add-in, which crashed when opening .aspx and .js files!!!

baroso
A: 

Awesome..... Perfectly Worked out for me............

Channabasappa Heralgi