Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Visual Studio crash opening ASPX with MVC RC1

Tags:

  • 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...

like image 624
Ronnie Avatar asked Feb 01 '09 12:02

Ronnie


2 Answers

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)

like image 138
spmason Avatar answered Sep 28 '22 12:09

spmason


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

like image 33
KristoferA Avatar answered Sep 28 '22 13:09

KristoferA