MicrosoftDocs / mixed-reality

Mixed Reality documentation
Creative Commons Attribution 4.0 International
174 stars 184 forks source link

Multiple precompiled assemblies with the same name Newtonsoft.Json.dll #401

Open rgeorge0706 opened 3 years ago

rgeorge0706 commented 3 years ago

At "Importing the tutorial assets" when I try to import Azure Storage for Unity (version 2021.1.16f1), I get the below errors (numbers at beginning added by me): (1) 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. (C:/Users/username/OneDrive/Documents/UnityWork/AzureCloudTutorials3/Library/PackageCache/com.unity.nuget.newtonsoft-json@2.0.0/Runtime/Newtonsoft.Json.dll)

(2) 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/Azure Storage/Plugins/Newtonsoft.Json.dll)

If I try to remove either one of these, more errors will pop up.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

bphillips09 commented 3 years ago

Hi @rgeorge0706, can you let me know what version of the MRTK you are using?

Also, I don't believe that specific tutorial has been updated to support Unity 2021 yet. It is possible that this issue is indeed related to the version of Unity you are using, as compatibility has only been tested with Unity 2019.4 LTS.

rgeorge0706 commented 3 years ago

Hi @rgeorge0706, can you let me know what version of the MRTK you are using?

Also, I don't believe that specific tutorial has been updated to support Unity 2021 yet. It is possible that this issue is indeed related to the version of Unity you are using, as compatibility has only been tested with Unity 2019.4 LTS.

I am using MixedRealityFeatureTool-1.0.2104.4-Beta

rgeorge0706 commented 3 years ago

Sorry closed by mistake

bphillips09 commented 3 years ago

@rgeorge0706 This tutorial series supports Unity 2020 LTS (currently 2020.3.x) if you are using Open XR or Windows XR Plugin and also Unity 2019 LTS (currently 2019.4.x) if you are using Legacy WSA.

I would recommend using Unity 2020.3 and seeing if this resolves your issue for now.

rgeorge0706 commented 3 years ago

I used Unity 2020.3, and I still face the same issue and see the same error message.

It seems that Azure Storage needs Newtonsoft v10 while Unity automatically installs Newtonsoft v12 for a Version Control package added when creating a new project. The dependencies for these packages are causing the "multiple precompiled assemblies" error.

bphillips09 commented 3 years ago

@rgeorge0706 Is this a third-party Version Control package you are installing? This tutorial series was validated with no errors on Unity 2020.3 LTS, but I haven't personally tested it myself. I should be able to do that later today and see if I can replicate your issue.

rgeorge0706 commented 3 years ago

The version control package is automatically included when I create Unity projects with Unity 2020.3.16, I did not download it from a third party.

limsb95 commented 3 years ago

Any solution for this issue?

rgeorge0706 commented 3 years ago

@limsb95 I removed Version Control, which is found in Windows>Package Manager. And it fixed my multiple Newtonsoft.Json.dll errors.

bphillips09 commented 3 years ago

@rgeorge0706 I'm glad you got it working, although there should be a fix that is implemented. Once I can reproduce, I'll file a PR.

josh-yang92 commented 2 years ago

I was facing the same issue. I also removed Version Control and it works