24
  • 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 disappears! 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...

Robert
  • 1,286
  • 1
  • 17
  • 37
Ronnie
  • 8,053
  • 6
  • 34
  • 34
  • I found it was because of a faulty update... I've now reinstalled VS2010, installed SP1 and disabled Microsoft Update (NOT Windows Update). Everything works smooth! – Druid Oct 20 '11 at 19:41

12 Answers12

30

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
  • 4,048
  • 2
  • 24
  • 19
  • 1
    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 Feb 23 '09 at 04:48
  • 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 Feb 26 '09 at 11:16
  • 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 Jun 08 '09 at 17:39
11

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
  • 12,287
  • 1
  • 40
  • 62
5

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

martijnboland
  • 403
  • 3
  • 5
4

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
  • 6,603
  • 4
  • 21
  • 27
  • 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 Oct 04 '10 at 15:43
4

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
  • 2,935
  • 4
  • 26
  • 31
1

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
  • 11
  • 1
1

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
  • 9,869
  • 15
  • 60
  • 87
0

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
  • 43,168
  • 21
  • 122
  • 188
0

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!

j0k
  • 22,600
  • 28
  • 79
  • 90
baroso
  • 1
0

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.

rmontgomery429
  • 14,660
  • 17
  • 61
  • 66
0

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

0

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
  • 8,053
  • 6
  • 34
  • 34