zoukankan      html  css  js  c++  java
  • 解决Newtonsoft.Json版本问题

    在配置文件中添加以下代码,App.config或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-10.0.0.0" newVersion="10.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>

    oldVersion从什么版本到什么版本都强制使用newVersion的版本。

    本例子说明从0版本到10版本,都强制使用10版本。

    放上Newtonsoft.Json的版本下载地址:https://github.com/JamesNK/Newtonsoft.Json/releases

    下载之后里面包括了.NET各版本的DLL文件,选择合适你工程的版本就行了。

  • 相关阅读:
    程序猿小白博客报道
    UML
    mysql隔离级别相关
    mac使用相关笔记
    git相关
    maven相关
    springboot相关
    guava
    IDEA高效运用技巧
    spring事务相关
  • 原文地址:https://www.cnblogs.com/TanSea/p/Newtonsoft_Json_Version_Error.html
Copyright © 2011-2022 走看看