0

我对这些问题无法加载文件或程序集“WebGrease,版本= 1.5.1.25624 - 或任何其他版本

Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies

Could not load file or assembly 'WebGrease' one of its dependencies. The located assembly's manifest definition does not match the assembly reference

Could not load file or assembly 'WebGrease' or one of its dependencies

发现了同样的问题这些答案似乎没有帮助。

我有一个WebForms项目运行.Net 4; 不是 MVC。

我正在使用Microsoft Web Optimization及其依赖项添加捆绑&缩小。

我收到的错误:

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)

我试图改变网络的油脂,还网络优化的版本。没有任何工作。

这些图像显示我现在的引用,网络配置和其他信息:

网络润滑脂: enter image description here

网络优化 enter image description here

Web配置 enter image description here

软件包配置 enter image description here

我尝试使用下面的代码,在我的母版页申请我包:

<asp:PlaceHolder runat="server"> 
    <%: System.Web.Optimization.Scripts.Render("~/JS/Global") %> 
    <%: System.Web.Optimization.Styles.Render("~/CSS/Global") %> 
</asp:PlaceHolder> 

任何人有任何想法,我怎么能得到这个工作?我不介意使用旧版本的库;似乎无法找到不会导致问题的原因。

它可能是NewtonSoft.Json的版本吗?

更新

所以不管我安装哪些版本,我得到确切同样的消息,一直到版本..似乎无法到哪问题奠定

回答

2

为什么您重定向Newtonsoft.Json版本绑定到版本7.0.0.0。你的软件包中没有这样的版本。删除该重定向或添加Newtonsoft.Json的适当版本。

+0

这就是web.config中已经存在的内容 - 我会给它一个并让你知道.. :) – Darren

+0

我刚刚评论过整个Newtonsoft.Json的''节点,它工作正常。谢谢! - 不知道为什么在那里.. – Darren

相关问题