Version Conflict despite AutoUnify being set to true

Samudra Banerjee 6 Reputation points
2022-08-30T02:57:51.263+00:00

Hi all,

We have a project with a dependency on NewtonSoft.json version 12.0.3, to which we are adding as dependency, another project which depends on 13.0.1. With autounify being set to true, we expect this conflict to be resolved to the latest version of the library. However, we get the below warning in the build logs.

235859-image.png

Looks like the only reference which depends on version 12 is the Newtonsoft.json library itself, which is weird. Does anyone have any idea why we are seeing this behavior?

Here is the binlog file for reference - https://microsoft-my.sharepoint.com/:u:/p/sabaner/EZitcfiQmKZHq6ZxWYj9XSkBlmwuo49Z_BwM-bNtPkbdTA?e=cbTs54 (Search "References which depend on Newtonsoft.Json")

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,099 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,526 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 24,636 Reputation points Microsoft Vendor
    2022-08-30T09:57:55.51+00:00

    Hi @Samudra Banerjee ,

    Welcome to Microsoft Q&A!

    Which version of Visual Studio are you using? Please clean and rebuild your project to try again.

    Besides, can you open the App.config file? Please find the bindingRedirect entry for Newtonsoft.Json assembly and check if the old and new versions are specified.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Samudra Banerjee 6 Reputation points
    2022-09-01T01:59:44.673+00:00

    We checked with a Visual Studio dev, and he mentioned that this is expected in msbuild since our primary reference is version 12. There may be a hack around it, but the recommendation was to upgrade to version 13.

    0 comments No comments