Asp.net mvc 无法加载程序集网页。是否在主机上加载部署版本2?

Asp.net mvc 无法加载程序集网页。是否在主机上加载部署版本2?,asp.net-mvc,visual-studio,iis,hosting,.net-assembly,Asp.net Mvc,Visual Studio,Iis,Hosting,.net Assembly,我有一个ASP.NET MVC 2网站(VS2010),我已将其升级到ASP.NET MVC 3(VS2012),该网站在本地IIS7上运行,但在发布该网站时,主机上出现以下异常: Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The syste

我有一个ASP.NET MVC 2网站(VS2010),我已将其升级到ASP.NET MVC 3(VS2012),该网站在本地IIS7上运行,但在发布该网站时,主机上出现以下异常:

 Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
经过一些seartch之后,我发现它指出我应该在一些引用(包括System.Web.WebPages)上设置CopyLocal,并在VS2012中使用发布工具,但这产生了以下异常

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
我找不到任何用于设置copyLocal的部署dll

我怎样才能解决这个问题呢?

读一读


您需要添加对System.Web.WebPages.Deployment的引用,并将其设置为CopyLocal。

很遗憾,但此链接现在不再有效(404错误);并带您进入该网站的主页。