I installed the new VS2013 Update 2. As soon as I open a .cshtml file VS crashes.
I tried:
- repair VS
- deactivated all extesions
- devenv.exe /ResetSkipPkgs
- resetted all settings
without success
I installed the new VS2013 Update 2. As soon as I open a .cshtml file VS crashes.
I tried:
without success
Most probably this would be happen after Xamarin VS extension installed.
So please follow below steps to fix. This worked for me.
Close all instances of Visual Studio.
Go into your "(Visual Studio install path)\Common7\IDE\Extensions\Xamarin\Xamarin\3.9.483.0\"
And rename the three files: System.Web.Razor.dll, System.Web.WebPages.dll, and System.Web.WebPages.Deployment.dll into System.Web.Razor.bad, System.Web.WebPages.bad, and System.Web.WebPages.Deployment.bad.
Search your registry with the registry editor and remove the "RazorTemplatePreprocessor" key.
Delete your solution user preferences files: (Solution Name).suo
When you start up Visual Studio, You can open the csHTML files.
I had the same error after installing Xamarin. The Xamarin extension in Visual Studio couldn't be disabled so I had to completely uninstall from Control Panel.
Anyone looking for a solution that doesn't involve uninstalling, this link might help: https://bugzilla.xamarin.com/show_bug.cgi?id=26850
complete unistall and reinstall of VS solved the problem for me.
I know this is somewhat old, but I wanted to throw in what solved the issue for me as everything above (yes, even an uninstall and reinstall of VS failed to work).
I had to uninstall Microsoft ASP.NET and Web Tools (you can't do this through VS, you have to download the installer for the version you have and use it to uninstall it).
I then reinstalled Microsoft ASP.NET and Web Tools and made sure it was up-to-date. This resolved the issue for me.
if you have xamarine installed , try uninstalling it , that worked for , after trying all the other options
I was having this same issue (had just installed Xamarin on Visual Studio 2013, and then all .cshtml views were not opening and acting like they were not there).
Installing VS2013 update 4 fixed my issue.