Search Unity

  1. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice

DLL reference compiler error

Discussion in '2020.1 Beta' started by Rodolphito, Apr 1, 2020.

  1. Rodolphito

    Rodolphito

    Joined:
    Jan 31, 2014
    Posts:
    17
    Just open the attached unity project with unity 2020, and you'll get the error:
    Code (CSharp):
    1. Assembly 'Assets/System.Memory.dll' will not be loaded due to errors:
    2. System.Memory references strong named System.Buffers, versions has to match. Assembly references: 4.0.2.0 Found in project: 4.0.3.0.

    I generated the DLL dependency tree with a vanilla csproj and let nuget autoresolve them so i know for sure these DLLs work with each other. They work in unity 2018 and 2019, but it doesn't like it in 2020.

    I reported the bug literally months ago and got a no-repro response, yet i can reproduce it across several OSes and Unity 2020.1.x alphas and betas.
     

    Attached Files:

  2. balar_86

    balar_86

    Joined:
    Apr 3, 2018
    Posts:
    4
    Hi I am getting same error, got stuck for a while! Any clue on this issues. Please let me know.
     
  3. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    48
    I'm on the same boat.

    I had Google Text to Speech and Google Translate API working on Unity 2019.3 but Unity 2020 requires the dlls to be the exact version and wont load the dlls despite them being compatible.


    Code (CSharp):
    1.  
    2. Assembly 'Library/ScriptAssemblies/Assembly-CSharp-Editor.dll' will not be loaded due to errors:
    3. Reference has errors 'Google.Cloud.TextToSpeech.V1'.
    4.  
    5. Assembly 'Assets/Google/Common/Google.Api.Gax.Grpc.dll' will not be loaded due to errors:
    6. Reference has errors 'Google.Apis.Auth'.
    7.  
    8. Assembly 'Assets/Google/Common/Google.Apis.Auth.dll' will not be loaded due to errors:
    9. Google.Apis.Auth references strong named Newtonsoft.Json, versions has to match. Assembly references: 10.0.0.0 Found in project: 11.0.0.0.
    10.  
    11. Assembly 'Assets/Google/Common/Google.Apis.Auth.PlatformServices.dll' will not be loaded due to errors:
    12. Reference has errors 'Google.Apis.Auth'.
    13.  
    14. Assembly 'Assets/Google/Common/Google.Apis.Core.dll' will not be loaded due to errors:
    15. Google.Apis.Core references strong named Newtonsoft.Json, versions has to match. Assembly references: 10.0.0.0 Found in project: 11.0.0.0.
    16.  
    17. Assembly 'Assets/Google/Common/Google.Apis.dll' will not be loaded due to errors:
    18. Google.Apis references strong named Newtonsoft.Json, versions has to match. Assembly references: 10.0.0.0 Found in project: 11.0.0.0.
    19.  
    20. Assembly 'Assets/Google/Common/Google.Apis.PlatformServices.dll' will not be loaded due to errors:
    21. Reference has errors 'Google.Apis'.
    22.  
    23. Assembly 'Assets/Google/Common/Grpc.Auth.dll' will not be loaded due to errors:
    24. Grpc.Auth references strong named Google.Apis.Auth, versions has to match. Assembly references: 1.21.0.0 Found in project: 1.41.1.0.
    25. Grpc.Auth references strong named Google.Apis.Auth.PlatformServices, versions has to match. Assembly references: 1.21.0.0 Found in project: 1.41.1.0.
    26.  
    27. Assembly 'Assets/Google/TextToSpeech/Google.Cloud.TextToSpeech.V1.dll' will not be loaded due to errors:
    28. Reference has errors 'Google.Api.Gax.Grpc'.
    29.  
    30. Assembly 'Assets/Google/Translate/Google.Cloud.Translate.V3.dll' will not be loaded due to errors:
    31. Reference has errors 'Google.Api.Gax.Grpc'.
    32.  
    33. Assembly 'Assets/Google/Translate/Google.LongRunning.dll' will not be loaded due to errors:
    34. Reference has errors 'Google.Api.Gax.Grpc'.
    35.  
     
  4. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    48
    I just managed to work around this by unticking "Validate References" on the inspector.

    upload_2020-4-24_16-43-51.png

    It's good that we can bypass the this validation.. but imho having the validation work like this kind of defeats the purpose of having it at all.
     
    balar_86 likes this.
  5. balar_86

    balar_86

    Joined:
    Apr 3, 2018
    Posts:
    4
    Thanks a Lot! It works :):D
     
  6. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,225
    It's using the wrong assembly version, but where does that come is what to look for, Unity got it from somewhere. In my case this was triggered when I replaced CompilerServices.Unsafe that ships with Collections. So my theory is it takes the first reference it hits, and then uses that assembly version for every other dll with a reference.
     
unityunity