微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

asp.net-mvc – 无法加载汇编WebPages.Deployment版本2在主机?

我有一个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之后,我发现this表示我应该在一些引用(包括System.Web.WebPages)上设置copyLocal,并且还使用VS2012中的发布工具,但是这会产生以下异常?

Could not load file or assembly 'System.Web.WebPages.Deployment,PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

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

我该如何解决

解决方法

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

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐