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

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,

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.

You can try removing Advertisement or other packages and the problem will be gone…

this is still an issue when using openAPI generated code Newton.Json ect , very
very bad @