Conflicting versions of Newtonsoft.json library.
Steps to Reproduce issue:
I have two custom plugin developed on top of Kafka and REST. To fullfill the plugin I am using 3rd party libraries as part of dependency. Dependency internally uses Newtonsoft.Json package with their specific version.
package use for developing kafka plugin
package use for developing REST plugin
.net should not show the error
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> System.IO.FileLoadException : Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
as 3rd party library should refer their package according to their version. For me if I navigate to
%USERPROFILE%.nuget\\packages
location I can see version graph for newtonsoft.json and 3rd party lib should use them at runtime. Version 6.0.4 and 11.0.2 should load at it's runtime.
请使用Update-Package命令更新所有项目中的所有软件包
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.