Creating ASP Web App fails in Visual Studio 2013

若如初见. 提交于 2020-01-24 12:54:46

问题


I'm trying to make new ASP.NET Web Application project in Visual Studio 2013 but it immediately fails with this error:

Could not load type 'Microsoft.VisualStudio.Web.WindowsAzure.Contracts.AzureResourceCreationType' from assembly 'Microsoft.VisualStudio.Web.Internal.Contracts, Version=2.3.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a'.

I used to be able to create web apps. Visual studio updated to update v4 a while back. Also I made sure all extensions are updated.

Any help would be greatly appreciated, thank you.


回答1:


After a lot more searching I found the answer from this post: Visual Studio 2013 Premium solution load errors after Update 3

I had to run the following commands and everything works again afterwards.

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.dll"

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Internal.Contracts.dll"




回答2:


I had the same issue after removing VS2015RC and installing full VS2015.

Side note: The above fix (changing path to point at "Microsoft Visual Studio 14") fixed the above error in VS2015.

Looking through the control panel and program updates, VS2013 update 4 was installed around the same time as VS2015 so I ran a repair on update 4 and it had no affect.

Repaired KB2932965 a VS2013 update, still no luck



来源:https://stackoverflow.com/questions/27856535/creating-asp-web-app-fails-in-visual-studio-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!