无法在主机上加载程序集WebPages.Deployment版本2?

Ivy*_*Ivy 14 iis asp.net-mvc hosting .net-assembly visual-studio

我有一个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.
Run Code Online (Sandbox Code Playgroud)

在一些seartch之后,我发现表明我应该在一些引用上设置CopyLocal(包含System.Web.WebPages)并且还使用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.
Run Code Online (Sandbox Code Playgroud)

我找不到任何部署DLL来设置copyLocal?

我该怎么解决这个问题?

mag*_*tte 19

阅读http://joel.net/getting-asp.net-mvc-3-working-on-discountasp.net

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