We already have Newtonsoft.Json in our project, when adding “Remote config” from the UPM UI, i am getting conflicts on all types from Newtonsoft.Json since we already have it, and the package references another copy of it as well.
I had a similar issue if I recall, and I believe I used this JSON .NET For Unity | Input Management | Unity Asset Store. Otherwise, can you provide your steps to install Newtonsoft.Json on a new project so we can attempt to reproduce here?
I have Newtonsoft.JSON for a long time in our project. It was imported as a UnityPackage from the asset store.
It is located in some folder in our project.
When importing the remote config package, i am getting conflicts.
No, when you make the call, put in the fully qualified name of the method, with the namespace. Yes, we will look into it, you would need to wait for a future release however. Please show your Using statement, and a representative method call. I’ll show you how to add the FQN.
the fully qualified name will not work. it’s not the call that is problematic, its the fact that the same classes are being compiled twice in 2 separate assemblies, which is not possible.
Is there any workaround for this so we can try remote config? so far i haven’t found one.
It is suggested that you remove one Newtonsoft or the other (the Newtonsoft package in Remote Config OR the existing one in the project), and then re-point the broken references to the version you choose to keep
Hey guys,
I wont be able to remove the existing Newtonsoft in the project and I just couldn’t figure out how to remove the Newtonsoft from remote config. Is there a way to remove the Newtonsoft that is getting added because of adding the remote config package ?
Can you provide additional details? Why are you not able to remove the existing package? Once I have a few more details, I can check with engineering. Perhaps share some screenshots and any errors that you receive.
Remote Config shouldn’t ship with its own copy of Newtonsoft (a very common library used by many teams) - it should declare a dependency on the hosted Newtonsoft package, so that teams can use that package the same way Remote Config uses that package, assuming it should use something as heavy as Newtonsoft at all!
Why can’t remote config use the built in JsonUtility from Unity itself? Because it’s too primitive? If so, that’s why many games already have the full Newtonsoft project in their projects, and you will run into this conflict repeatedly. Maybe JsonUtility should be improved.
Either way, bundling your own copy of something many teams already have is inviting conflicts just as @liortal reported here.
It’s not that we cant remove the existing Newtonsoft, Its just that we wish we had an option to remove the newly added Newtonsoft from RemoteConfig.
The existing Newtonsoft that we have in the project is part of our framework and we would not want to remove that at this point of time in our development. It will be great if we can remove the new Newtonsoft that gets added to the project again when we are experimenting with the RemoteConfig.