在主机无法加载程序集WebPages.Deployment 2版? [英] Could not load assembly WebPages.Deployment version 2 at host?

查看:366
本文介绍了在主机无法加载程序集WebPages.Deployment 2版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET MVC 2网站(VS2010),我已经升级到ASP.NET MVC 3(VS2012),这适用于本地IIS7鳍,但发布时我得到主机此异常:

I have a ASP.NET MVC 2 website (VS2010) that I have upgraded to ASP.NET MVC 3 (VS2012) and this works fin on local IIS7 but when publishing it I get this exception on host :

 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我发现指出我应该设置CopyLocal一些引用(计有在System.Web.WebPages),也可以使用在VS2012发布工具,但这个产生以下异常?

After some seartch I found this that states that I should set CopyLocal on some of the references(inlcuding the System.Web.WebPages) and also use the publish tool in VS2012, but this generated the following exception?

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.

和我不能找到任何部署的dll设置copyLocal?

And I can´t find any Deployment dll to set copyLocal?

我怎么能解决这个问题?

How could I solve this?

推荐答案

有一个读<一个href=\"http://joel.net/getting-asp.net-mvc-3-working-on-discountasp.net\">http://joel.net/getting-asp.net-mvc-3-working-on-discountasp.net

您需要向System.Web.WebPages.Deployment并设置引用添加也CopyLocal。

You need to add a reference to System.Web.WebPages.Deployment and set that also to CopyLocal.

这篇关于在主机无法加载程序集WebPages.Deployment 2版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆