Your official information source from the .NET Web Development and Tools group at Microsoft.
We found Visual Studio 11 Beta hits a crash bug when editing a Razor page (cshtml/vbhtml) in a MVC4 project or a Razor2 Website if the indenting option for the HTML editor is set to Block instead of Smart. The workaround is to go to Tools->Options->Text Editor->HTML->Tab and change the indenting option to Smart.
HTML smart indenting is a new feature in Visual Studio 11 and is the default option. However, if you have previous versions of Visual Studio installed on the same machine, the old indenting option might get accidently migrated to your Visual Studio 11 Beta settings. And the block HTML indent will trigger our MVC4 editor problem.
For VS2010sp1 + MVC4 Beta razor problem workaround, please visit http://blogs.msdn.com/b/webdevtools/archive/2012/02/27/vs2010-sp1-mvc4-beta-workaround-for-cshtml-vbhtml-editor-s-long-pause.aspx
Web Platform and Tools Team
Update on April 6, 2012
April 2012 Update for Visual Studio 11 Beta fixed this issue. Please install the update from Visual Studio 11 Beta "Tools"->"Extension Manager", "Updates"->-"Product Updates".
Where i find what new features in the Razor View Engine 2.0 are ?
We are to publish the Web Pages/Razor features (also a section for the new features) soon in asp.net. I'll blog it when it's published.
For now, there are 2 good blogs talking about the new features:
This fixed my issue, thank you very much for posting the work around.
I am using MVC 4 in VS2010 and it's crashing for me too. The exception is AggregateException from the Razor MVC module.
Can't use the workaround since Smart Indenting for HTML is not available in 2010.
falonso, please refer to the link in the blog for VS2010 workaround. Thanks. blogs.msdn.com/.../vs2010-sp1-mvc4-beta-workaround-for-cshtml-vbhtml-editor-s-long-pause.aspx