无法加载文件或程序集'System.Web.Optimization,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35' [英] Could not load file or assembly 'System.Web.Optimization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

查看:438
本文介绍了无法加载文件或程序集'System.Web.Optimization,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管我已经为Microsoft.AspNet.Web.Optimization安装了nuget数据包,但我仍然收到此错误消息

I keep getting this error although I already installed the nuget packet for Microsoft.AspNet.Web.Optimization...

无法加载文件或程序集'System.Web.Optimization, 版本= 1.0.0.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'

Could not load file or assembly 'System.Web.Optimization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

很明显,Nuget中的一个是v.1.13,而我的解决方案中引用的那个是v.1.0.0 ...问题是,我找不到匹配这两个的方法.我找不到适用于v.1.0.0的安装,也找不到删除或覆盖1.1.3的1.0.0的方法.

Apparently, the one in the Nuget is a v.1.13 while the one referenced in my solution somewhere is v.1.0.0 ...Problem is, I can't find the way to match these two. I can't find the install for v.1.0.0 or the way to delete or override the 1.0.0 for the 1.1.3.

对此有任何帮助吗?

您需要查看的任何代码,请告诉我,我将更新问题.

Any code you need to see, let me know and I'll update the question.

推荐答案

我能够通过将以下内容添加到我的web.config中来解决此问题:

I was able to fix this issue by adding the following to my web.config:

<configuration>
    <runtime>
        <dependentAssembly>
            <assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.0.0.0" newVersion="1.1.3.0" />
        </dependentAssembly>
    </runtime>
</configuration>

这篇关于无法加载文件或程序集'System.Web.Optimization,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆