applejag/Newtonsoft.Json-for-Unity

Help: Newtonsoft no more found into 2021.1.17f1

godboutj opened this issue · 4 comments

Hi,
I just installed a new version of Unity on a new PC to compile, I was using 2021.1.6f1 before and everything was fine (on MAC OS). Now the PC with Windows hub offer only 2021.1.17f1, so I did try to install it and open my solution, but I can't compile with it, it complain it cannot find any newtonsoft namespace.

Any body getting error like this with recent Unity version:
Library\PackageCache\com.unity.collab-proxy@1.7.1\Editor\PlasticSCM\WebApi\CredentialsResponse.cs(3,7): error CS0246: The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
I go t bunch of those into the console and the build fail because of this. I took a look into the package manager and the package is there, I even try to remove and install it again but would still fail.

I did try to remove the package entirely and the build succeeded?! is this package built-in Unity now?! Which version do they use? I still have some C# .Net Std 2.0 lib I do compile that have newtonsoft into them too. Normally the version must match between the 2 to work properly.

Hi @godboutj! Thanks for reporting this! Please excuse my late response.

I'm in the middle of a negotiation with Unity to officially adopt my package or not. They did fork my repo before and used their fork in some of their internal packages, leading to some issues such as Unity assets GUIDs and C# namespace collisions. This conversation has been going on for maybe two years now and currently the milestone for an "official adoption" of this repo is for the Unity 2022 release, altough this is not certain as they are not that keen in having to support a third-party package, even with my help.

The latest tip I can give is that if you're using a package that already references Unity's fork of my repo, namely com.unity.nuget.newtonsoft-json@2.0, then stick with that one. It's based off the v12.0.101 tag of this repo if I'm not misstaken.

Try to check the Library\PackageCache\com.unity.collab-proxy@1.7.1\package.json file to see if it has such a dependency. And for your .NET Standard 2.0 libraries you can safely target any Newtonsoft.Json v12.0.x version and it should work fine with their package.

Don't fray in reaching out again. Kind regards, Kalle

Hi,
thanks for the info, and great package by the way. Hope they put it into the Unity packages list, right now it's a hidden dependencies and it's hard to know which version they are using.

Thanks again for coming back on this.
regards,
Jerome

Hope they will finally choose to officially adopt this package. Looking forward for good news. And thank you for your support. 👍

I'm closing this as "wont-fix". Please reopen if I misunderstood.