Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple precompiled assemblies on Newtonsoft #168

Open
rrowlands opened this issue Jun 15, 2023 · 1 comment
Open

Multiple precompiled assemblies on Newtonsoft #168

rrowlands opened this issue Jun 15, 2023 · 1 comment

Comments

@rrowlands
Copy link

The core scenario number 1 is failing for me with the following errors:

Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (E:/dev/projects/odokonia/unity/Library/PackageCache/com.unity.nuget.newtonsoft-json@3.0.2/Runtime/Newtonsoft.Json.dll)
Multiple precompiled assemblies with the same name Newtonsoft.Json.dll included on the current platform. Only one assembly with the same name is allowed per platform. (Assets/Dependencies/netstandard2.1/Newtonsoft.Json.dll)

I am guessing that this is due to the fact that Newtonsoft is now included by default in Unity and thus cannot be imported as a dependency using MsBuild?

@RoswellCityUK
Copy link

RoswellCityUK commented Jul 7, 2023

What version of Unity are you using? I had similar problem, but I had to just delete com.unity.nuget.newtonsoft-json package from manifest.json file. There is still issue that there is separate dependency graph for Unity Package Manager and MsBuildForUnity.

There is also a problem with importing packages that have dependency on NuGets, each package is resolved separately and they are generating separate folders with DLLs which is causing conflicts for me as well.

I still didn't find any way of resolving this even manually by disabling selected indirect dependencies in NuGets or in Unity packages.

Maybe a good idea would be to use packages-lock.json to at least verify what is already there, but on the other hand those are completely different packages and I think it will need to just check what files are there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants