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文件,选择合适你工程的版本就行了。

  • 相关阅读:
    [SDOI2016]排列计数
    Broken robot
    环路运输
    naptime
    Accumulation Degree
    选课
    没有上司的舞会
    金字塔
    Polygon
    石子合并
  • 原文地址:https://www.cnblogs.com/TanSea/p/Newtonsoft_Json_Version_Error.html
Copyright © 2011-2022 走看看