Search Unity

CS0433 error upon installation of Addressables package.

Discussion in 'Addressables' started by ErichJag, Jul 8, 2019.

  1. ErichJag

    ErichJag

    Joined:
    Jun 12, 2018
    Posts:
    2
    I imported package Addressables 1.1.4 into my project and I get following errors

    this type of errors (1 samples)
    Code (CSharp):
    1. Library\PackageCache\com.unity.addressables@1.1.4-preview\Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs(37,32): error CS0433: The type 'Task<TResult>' exists in both 'System.Threading, Version=1.0.3333.0, Culture=neutral, PublicKeyToken=402899b480e6f383' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    I have under settings
    Scripting runtime version: .NET 4.x Equivalent
    Scripting backend: IL2CPP
    Api compatibility level: .NET 4x

    As I understand, \Runtime\ResourceManager\AsyncOperations\AsyncOperationBase.cs file has a dependency conflict with mscorlib. I have been googling for several hours now, and I am at my wits end. Maybe someone can suggest a course of action to resolve such error
     
  2. ErichJag

    ErichJag

    Joined:
    Jun 12, 2018
    Posts:
    2
    Interestingly enough I created A new empty project and added a single package (addressables) and it threw no error. So there is something happening in that other project. Since the conflict is between mscorlib and addressables package file, I am not sure where to start.. maybe I need to perform some kind of "clean" ?
     
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Most likely this is due to some part of your code defining what Task is. What's odd is that the line in question is explicitly
    System.Threading.Tasks.Task<object>, so it should be totally clear. In any case, search or code for something like "using Task = ". This syntax can declare "Task means mscorlib", which for us, it doesn't. If that is your problem, then you can move that using inside the namespace using it.

    If that isn't your problem, perhaps file a bug against unity with the project, and we'll be able to hunt it down.