SignalR & WebApi - colliding Newtonsoft.Json references

。_饼干妹妹 提交于 2019-12-01 16:03:17

Web API & SignalR were built with reference to 4.5 assembly version of Json.net..if you would like to use 6.0 version of Json.net, you would need to add an assembly binding redirect in your configuration file.

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!