Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unity3d : The type "task" exist in both Unity.Tasks and mscorelib

I created a blank project with unity 2019.1.4f1. I imported the firebase SDK package for authentication and another google sign in package from here. I am basically trying to achieve google signin in android with firebase. But when I import the 2nd package ( google sign in), I get this error (below)

I haven't done anything else in the project, just imported. I have no idea what to do.

Library\PackageCache\[email protected]\Scripts\Editor\TMP_PackageUtilities.cs(310,17): error CS0433: The type 'Task' exists in both 'Unity.Tasks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

like image 513
Nitin Avatar asked Jun 03 '19 07:06

Nitin


2 Answers

its simple,

goto: youProjectFolder\Assets\Parse\Plugins

remove all files outside of the dotNet45 Folder

Image from your Project Foulder

and the error should be solved.

like image 176
Ronny Bigler Avatar answered Sep 19 '22 02:09

Ronny Bigler


The issue that you may be running into is a compatibility layer that brings .NET 4.x features into .NET 3.x runtime called Parse. In Firebase, this is why there are dotnet3 and dotnet4 folders.

When you do your plugin imports, assuming that you're using the .NET 4.x runtime (default in Unity 2019), make sure that you grab the unity packages from the dotnet4 folder from Firebase. Then, when you import the Google SSO package, exclude the Parse directory (the Firebase plugin should have pulled in the necessary parts already anyway). That should get you up and running!

like image 20
Patrick Martin Avatar answered Sep 22 '22 02:09

Patrick Martin