未能加载文件或程序集“Newtonsoft.Json”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
2016-04-26 09:55
696 查看
报错:
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426094300002-1569466753.jpg)
解决办法:将原有的
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
步骤截图:
1、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095341470-1387272995.jpg)
2、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095418127-1110072286.jpg)
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095428736-257852357.jpg)
3、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095446564-321228937.jpg)
4、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426094300002-1569466753.jpg)
解决办法:将原有的
Newtonsoft.Json.dll移除掉,再将Package.config里面的版本信息注释掉,通过NuGet程序管理重新安装,然后重新生成就行了。
如果不行也可以在web.config里面加上<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
步骤截图:
1、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095341470-1387272995.jpg)
2、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095418127-1110072286.jpg)
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095428736-257852357.jpg)
3、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095446564-321228937.jpg)
4、
![](https://images2015.cnblogs.com/blog/873720/201604/873720-20160426095503767-1100310522.jpg)
相关文章推荐
- Eclipse中jsp,html代码自动排版太丑怎么办?!改改就好了!
- JS闭包?
- js window.open打开新窗口 参数
- 用js下载文件
- 钉钉客户端JS-API权限签名算法.NET版
- JS调用Activity方法时,方法里的overridePendingTransition 不起作用
- JS如何获取页面可见区域高度
- JSON学习笔记
- jstat:虚拟机统计信息监视工具
- 初探 js对象与数组
- Extjs 4.0.7 中模式窗口的CURD
- [Angular 2] Managing State in RxJS with StartWith and Scan
- 我对js原型链的理解
- JS跨域调用之document.domain--相同基础域名页面之间的调用
- Javascript的replace函数以及PHP中的str_replace()函数
- javaScript基础
- [置顶] javascript入门基础小案例-----按键盘的方向键来控制块的移动z注释:
- JS字符串与对象互相转换
- JSON格式化
- rails提供跳转js的ajax实例分析特殊情况