MVC3 项目正在寻找 'System.Web.Mvc, Version=1.0.0.0,
我正在部署一个 MVC3 项目,该项目始于 xVal 的旧时代。我认为这是此错误的根源:
无法加载文件或程序集“System.Web.Mvc,Version=1.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”或其依赖项之一。找到的程序集的清单定义与程序集引用不匹配。 (HRESULT 异常:0x80131040)
我在生产服务器上正确运行了相同的 Web 应用程序 - 一个为应用程序的 v1 版本提供服务的 win08(R2 之前)框。现在我正在转移到新配置的 R2 框,发现任何引用 xVal 的页面都会抛出上述错误。
有没有一种方法可以传输旧的 dll,而无需通过 asp.net/mvc 站点挖掘旧发行版?我现在真的很想避免接触验证系统的任何部分。
谢谢
附录:最初,指向 Phil Haack 帖子的指针似乎解决了我的问题 - 但今天重新部署,并在此附加信息中遇到了相同的问题。
我正在使用 ELMAH 记录应用程序的错误,向 ELMAH 报告的来源可能会提供线索。我看到的是“App_Web_b1pe5vbs”,而不是“NHIBENATE”或“SYSTEM”或我的程序集名称之类的 SOURCE 属性。日志中有一些名称奇怪的来源。这里有什么可看的吗?
谢谢
I'm deploying an MVC3 project that began life in the old days of xVal. I think that's the root of this error:
Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I have the same webapp running correctly on the production server - a win08 (pre-R2) box that served the v1 version of the app. Now I'm moving to a newly provisioned R2 box and find that any page referencing xVal is tossing the above error.
Is there a way to transfer the older dll(s) without digging thru the asp.net/mvc site for an old distro? I'd really like to avoid touching any bits of the validation system right now.
thx
ADDENDUM: Initially the pointer to Phil Haack's post seemed to solve my problem - but re-deployed today and having the same issue with this additional info.
I'm using ELMAH to log the app's errors and the source being reported to ELMAH might offer a clue. Instead of the SOURCE property being something like 'NHIBERNATE' or 'SYSTEM' or my assembly's name i'm seeing 'App_Web_b1pe5vbs'. The log has a handful of these oddly named Sources. Any thing to see here?
thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 vs2010 中,您现在可以右键单击 MVC3 项目,单击“添加可部署依赖项”并选择 ASP.net MVC 复选框,它将在 _bin_deployableAssemblies 文件夹中添加所需的程序集。
in vs2010 you could now right click on the MVC3 project, click on "Add Deployable Dependencies" and select ASP.net MVC checkbox, it will add required assemblies in _bin_deployableAssemblies folder.