Nethereum icon indicating copy to clipboard operation
Nethereum copied to clipboard

Error importing unitynet35dlls

Open fedecaccia opened this issue 5 years ago • 6 comments

I get the following error importing unitynet35dlls in Unity 2019.2:

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

fedecaccia avatar Feb 09 '20 22:02 fedecaccia

@fedecaccia Even I'm getting similar errors. Were you able to resolve it?

aymusbond avatar Sep 21 '20 06:09 aymusbond

Are you targeting 3.5? it seems that System.Threading.Tasks has been included twice, this will only happen when targeting .net4 or above.

juanfranblanco avatar Sep 21 '20 10:09 juanfranblanco

Unity .NET 3.5 runtime has been deprecated since Unity 2018.3, it's very likely Unity developers won't/can't target 3.5. Only 4.x or .NET Standard 2.0

Perhaps the target for the Unity dlls should be a different runtime version?

ecp4224 avatar Jun 10 '21 15:06 ecp4224

There are two targets net35 and net461, also now net472

juanfranblanco avatar Jun 10 '21 15:06 juanfranblanco

Check the repo sample for net461 https://github.com/Nethereum/Unity3dSimpleSampleNet461. Edit: I am not planning to drop the net35 target, as you may have developers that have work already in old platforms. You might want to use this with an existing game.

juanfranblanco avatar Jun 10 '21 15:06 juanfranblanco

@edkek ^^ and hi, i didn't recognise you :)

juanfranblanco avatar Jun 10 '21 15:06 juanfranblanco