如果同一项目中不同第三方类库分别使用了不同版本的Newtonsoft.Json的情况下,可以在配置文件中添加以下节点,将0.0.0.0-9.0.0.0此区间的Newtonsoft.Json使用全部强制指向到8.0.0.0版本。

此方案适用于高版本的Newtonsoft.Json向下兼容!

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="8.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Newtonsoft.Json版本冲突时参考解决方案的更多相关文章

  1. Newtonsoft.Json 版本冲突时解决方案

    如果同一项目中不同第三方类库分别使用了不同版本的Newtonsoft.Json的情况下,可以在主项目配置文件中添加以下节点,将0.0.0.0-11.0.0.0此区间的Newtonsoft.Json使用 ...

  2. Newtonsoft.Json 版本冲突解决

    在做asp.net MVC 开发时,因为引用的dll 中使用了更高版本的 Newtonsoft.Json ,导致运行时发生错误, 查资料说是因为webApi使用了Newtonsoft.Json 导致了 ...

  3. Newtonsoft.Json版本冲突

    如果项目中不同第三方类库分别使用了不同版本的Newtonsoft.Json,可以在配置文件中添加以下节点,将0.0.0.0-9.0.0.0此区间的Newtonsoft.Json使用全部强制指向到项目中 ...

  4. [C#] Newtonsoft.Json 版本冲突

    在web.config或者app.config里面加上一段: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft ...

  5. FineUI中Newtonsoft.Json版本报错解决办法

    1.清空bin下的Newtonsoft.Json.dll 2.使用Nuget安装最新版本的Newtonsoft.Json.dll,安装脚本为 Install-Package Newtonsoft.Js ...

  6. VS2013新建MVC5项目,使用nuget更新项目引用后发生Newtonsoft.Json引用冲突的解决办法

    错误信息如下: 错误    3    类型“Newtonsoft.Json.JsonPropertyAttribute”同时存在于“c:\Program Files (x86)\Microsoft V ...

  7. 解决Newtonsoft.Json版本问题

    在配置文件中添加以下代码,App.config或Web.config <runtime> <assemblyBinding xmlns="urn:schemas-micro ...

  8. Newtonsoft.Json 版本不一致导致错误

    可以在配置文件添加这部分,其他版本的不一致,也可使用这种方式解决. <runtime> <assemblyBinding xmlns="urn:schemas-micros ...

  9. Intellij解决版本冲突时,merge界面各区块颜色区分

    灰色:删除 蓝色:改变 绿色:新增 红色:冲突

随机推荐

  1. MyEclipse开发JAX-RS架构WebServices收发JSON数据格式

    最近因项目需求,开始学习WebServices. 1.开发环境: MyEclipse2013 2.客户端发送的JSON数据格式为 {persons:[{"name":"a ...

  2. linux 关闭系统提示声音

    关闭Linux 提示声音:   rmmod pcspkr      //永久关闭 在/etc/modprobe.d/blacklist文件最后加上 blacklist pcspkr

  3. php curl 提交 总结

    1.post https提交 方法 function curl_post2($url='', $postdata='', $options=array()){ $ch = curl_init($url ...

  4. c#中如何得到百分比数值

    //此方法得到的百分比后小数太多,不行double percent=Convert.ToDouble(2)/Convert.ToDouble(34);string result=(percent*10 ...

  5. asp.net 页面url重写

    不更改情况下,页面路径为index.aspx?id=1,现在输入页面路径index/1时,也能访问到页面,这一过程叫做url重写 ①:在一个类里制定路径重写规则,以下为自定义UrlRewriterFi ...

  6. [Nginx 1] Nginx简介

    导读:现在项目中用到这个Nginx了,本来是想着把代码调通了就得了.想想还是花点时间总结总结,就利用门卫思维吧.今天主要是一个整体的介绍,然后在学习的过程中,接着总结Nginx的其他使用事宜. 一.什 ...

  7. ubuntu下,apt的参数使用,很实用呦

    ubuntu下apt-get 命令参数 常用的APT命令参数 apt-cache search package 搜索包 apt-cache show package 获取包的相关信息,如说明.大小.版 ...

  8. EasyUI学习笔记

    1,tabs获得被选中的标题 var tabTitle = $('#tabs').tabs('getSelected').panel('options').title;//获得被选中的标题 2.当设置 ...

  9. CThreadPool

    class CThreadPool { public: template <typename T> static void QueueUserWorkItem(void (T::*func ...

  10. com.google.inject.CreationException: Guice creation errors

    错误的原因:xml文件中方法名重复或错误