{System.IO.FileLoadException: 未能加载文件或程序集“Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040)
文件名:“Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed”
在 Qiniu.Util.QiniuJsonHelper.JsonEncode(Object obj)
在 Qiniu.RS.PutPolicy.ToString()
在 Qiniu.RS.PutPolicy.Token(Mac mac)
在 Common.Qiniufun.PutFile(String bucket, String key, String fname) 位置 e:\项目\Accounting\Accounting\Common\Qiniufun.cs:行号 236
在 Accounting.Controllers.ConsoleController.UploadImage() 位置 e:\项目\Accounting\Accounting\Accounting\Controllers\ConsoleController.cs:行号 240 === 预绑定状态信息 ===
日志: DisplayName = Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
(Fully-specified)
日志: Appbase = file:///E:/项目/Accounting/Accounting/Accounting/
日志: 初始 PrivatePath = E:\项目\Accounting\Accounting\Accounting\bin
调用程序集: System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35。
===
日志: 此绑定从 default 加载上下文开始。
日志: 正在使用应用程序配置文件: E:\项目\Accounting\Accounting\Accounting\web.config
日志: 使用主机配置文件: C:\Users\Administrator\Documents\IISExpress\config\aspnet.config
日志: 使用 C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config 的计算机配置文件。
日志: 策略后引用: Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8886c122/ebad9a1/Newtonsoft.Json.DLL。
日志: 尝试下载新的 URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/8886c122/ebad9a1/Newtonsoft.Json/Newtonsoft.Json.DLL。
日志: 尝试下载新的 URL file:///E:/项目/Accounting/Accounting/Accounting/bin/Newtonsoft.Json.DLL。
警告: 比较程序集名称时发生不匹配: 主版本
错误: 未能完成程序集的安装(hr = 0x80131040)。探测终止。
}

确认dll文件和版本之后在webconfig添加以下代码

  <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>

  newVersion为版本信息

最新文章

  1. 实现一个基于 SharePoint 2013 的 Timecard 应用(上)
  2. iOS 2D绘图 (Quartz 2D) 概述
  3. 上传文件fileupload
  4. 6.html5分组元素
  5. Adobe Edge Animate –EdgeCommons Log和全局变量设置功能
  6. String类中一些常用的函数
  7. SVD之最小二乘【推导与证明】
  8. 移动GIS在企业各个行业中的应用解决方案
  9. scrapy爬虫学习系列二:scrapy简单爬虫样例学习
  10. ccf-集合竞价-201412-3
  11. Python全栈开发记录_第八篇(模块收尾工作 json &amp; pickle &amp; shelve &amp; xml)
  12. PYTHON-TCP 粘包
  13. python之__dict__与dir(转载)
  14. 个人犯的一个golang routine错误
  15. [python]python官方原版编码规范路径
  16. [转]让Nginx支持ThinkPHP的URL重写和PATHINFO
  17. OpenCV 数字验证码识别
  18. 1108 Finding Average (20 分)
  19. (转)Linux开启mysql远程连接的设置步骤
  20. JavaScript Math.floor() 方法

热门文章

  1. 025-Cinder服务--&gt;安装并配置一个本地存储节点(ISCSI)
  2. Dinic最大流 || Luogu P3376 【模板】网络最大流
  3. “HTTP 错误 404.15 - Not Found 请求筛选模块被配置为拒绝包含的查询字符串过长的请求”之解决办法
  4. 生成keystore
  5. DevOps书单:调研了101名专家,推荐这39本必读书籍
  6. [洛谷P4436] HNOI/AHOI2018 游戏
  7. sqlserver数据库脱机和分离的区别
  8. 【leetcode】494. Target Sum
  9. FileUtils (从磁盘下载,从网络下载)
  10. 【BZOJ1563】诗人小G(决策单调性DP)