xoofx/UnityNuGet

Newtonsoft JSON conflict with Unity's internal version

mikeskydev opened this issue · 4 comments

Hi,

I'm working on a project that uses Google APIs Core Client Library, that defines Newtonsoft JSON as a dependency from this registry, which is therefore installed automatically.

However, I've gone to add Unity's Localization package, which depends on Unity's internal Newtonsoft JSON. Therefore, I can't add it. Annoyingly they're the exact same version, but just from different places.

I figure there may be a lot of situations where Unity's internal version will conflict with this registry's version, is there a way forward that could resolve these conflicts nicely without having to resort to not using this registry for packages, perhaps defining the dependency on Unity's version instead?

I'm not sure I understand why it's a problem specific to the localization package, shouldn't Unity get to depend on it's own first-party packages? If anything I don't want to use the Nuget version of Newtonsoft, I'd rather depend on Unity's version as it's used elsewhere.

Solved this for me by making my own version of the core package and swapping out which newtonsoft dependency it needed

bdovaz commented

Closing, it is a known problem that requires manual intervention to resolve the conflict as explained at: #125 (comment).