gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 21:57:14 24 4
gpt4 key购买 nike

我有一个 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.

经过一番搜索,我找到了 this这表明我应该在一些引用(包括 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.

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

我怎么能解决这个问题?

最佳答案

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

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

关于asp.net-mvc - 无法在主机上加载程序集 WebPages.Deployment 版本 2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11359957/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com