Search Unity

MathNet in Unity - "Task exists in both System.Threading and mscorlib"

Discussion in 'Formats & External Tools' started by Narvalou, Jul 7, 2020.

  1. Narvalou

    Narvalou

    Joined:
    Mar 31, 2015
    Posts:
    1
    So i've been trying to use MathNet to do some math stuff within Unity, I've had only troubles. First off to find a version that can be installed: If i did it with the nugget package manager from vs, i got an error saying i was missing a using statement or assembly reference, the using was there and all i could find was that apparently the newer versions are not supported because it is .NET 4 (maybe i'm wrong but that's what i understood).

    Then i tried dowloading a version of mathnet that still had the 3.5 dll and added them to Assets/Plugins and now i have this "Task exists in both system.threading and mscorlib" error in unity. The error doesnt show up in vs tho. I've seen other posts said that i had to use full names like "System.Threading.Tasks.Task" but it doesnt solve the problem for me, i dont know if i'm doing it correctly. When i look where is the error, it is in a file called TMP_PackageUtilities.cs in a function called "ScanProjectFiles" where it calls "Task.Run()".

    If you had the same problem i would be glad to know how you fixed it, if you need more information i can provide too. Thanks a lot.
     
    ArunH likes this.
  2. ArunH

    ArunH

    Joined:
    Oct 16, 2020
    Posts:
    1
    We are also facing same issue