Visual Studio 2013 Update 2 doesn't open cshtm

2019-05-07 07:09发布

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

12条回答
干净又极端
2楼-- · 2019-05-07 07:35

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.

查看更多
倾城 Initia
3楼-- · 2019-05-07 07:43

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

查看更多
我欲成王,谁敢阻挡
4楼-- · 2019-05-07 07:44

complete unistall and reinstall of VS solved the problem for me.

查看更多
疯言疯语
5楼-- · 2019-05-07 07:47

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.

查看更多
Evening l夕情丶
6楼-- · 2019-05-07 07:51

if you have xamarine installed , try uninstalling it , that worked for , after trying all the other options

查看更多
贼婆χ
7楼-- · 2019-05-07 07:54

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.

查看更多
登录 后发表回答