Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

CS0433: The type 'Task' exists in both Parse.Unity, and mscorlib

Discussion in 'Scripting' started by Cheeeese, Dec 6, 2021.

  1. Cheeeese

    Cheeeese

    Joined:
    Oct 5, 2012
    Posts:
    12
    I'm upgrading a project from 2018 to 2021. I get the following error

    Library\PackageCache\com.unity.services.core@1.0.1\Editor\Core\AsyncOperation\AsyncOperationExtensions.cs(39,23): error CS0433: The type 'Task' exists in both 'Parse.Unity, Version=1.3.3.0, Culture=neutral, PublicKeyToken=null' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

    I tried many fixes to a similar error but no luck

    Thanks,
     
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,051
    Some of your dependencies are incompatible with the newer Unity version. It looks like they have defined some typesas a workaround that were missing in older versions of Unity. Now that those types are available in Unity, you're getting the error because the two are conflicting.

    You have to updated your dependencies to a version that's compatible with the version of Unity you're using. The error is caused by the Parse library. If you use Parse directly, you need to update Parse, otherwise the library that is using Parse as a dependency.

    Unfortunately, there haven't been any official releases of Parse for .Net since 2016 (there's a prerelease but that's also over a year old now), so you might be out of luck – besides updating the library yourself or finding someone else who has.
     
  3. MrMobeen

    MrMobeen

    Joined:
    Sep 22, 2020
    Posts:
    2
    You can try removing Advertisement or other packages and the problem will be gone...
     
  4. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    183
    this is still an issue when using openAPI generated code Newton.Json ect , very
    very bad @Unity