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:55

What worked for me:

  1. Delete the suo file
  2. Re-opened VS from the sln file

Ciao

查看更多
聊天终结者
3楼-- · 2019-05-07 07:56

I resolved the problem by renaming the %LOCALAPPDATA%\Microsoft\VisualStudio\12.0\ ComponentModelCache folder to ComponentModelCacheOLD. First I had to quit VS2012, rename the folder, and then restart VS 2012. All problems went away.

查看更多
贼婆χ
4楼-- · 2019-05-07 08:00

For me this issue was caused by a config problem in Views/Web.config. The following change fixed the issue:

<system.web.webPages.razor>
- <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicFixedGuidToken=31BF3856AD364E35" />
+ <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
查看更多
Ridiculous、
5楼-- · 2019-05-07 08:02

For me, resolve the issue by running visual studio as a administrator.

查看更多
祖国的老花朵
6楼-- · 2019-05-07 08:02

This happened to me too when installing Razor Generator. I had a second copy of Visual Studio open when I installed Razor Generator.

I closed out of all instances of Visual Studio and reopened, and that fixed it.

查看更多
虎瘦雄心在
7楼-- · 2019-05-07 08:02

What worked for me:

  1. Disable razor generator extension.
  2. Restart VS.
  3. Open file.
  4. Re-enable razor generator extension.
查看更多
登录 后发表回答