【发布时间】:2013-10-25 09:13:08
【问题描述】:
在本地运行 Asp.Net MVC 应用程序时,一切运行正常,但在服务器上部署应用程序时,我收到此错误。
Could not load file or assembly 'WebGrease, Version=1.5.1.25624, 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)
我最近刚刚通过使用 WebGrease 的 NuGet 添加了 System.Web.Optimization 框架。
如果我查看参考资料,我的 WebGrease 版本是 1.5.2.14234,高于抱怨未找到的版本 - 1.5.1.25624。
在根 web 配置中,我在运行时标记下有以下内容:
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
如果我检查服务器上 bin 文件夹中的 WebGrease.dll,WebGrease DLL 的版本是 1.5.2.14234。谁可能需要其他版本 1.5.1.25624 以及如何解决这个问题?
非常感谢!
【问题讨论】:
标签: c# asp.net asp.net-mvc .net-assembly