Search Unity

HoloToolKit & MathNet.Numerics conflict

Discussion in 'VR' started by YannGROS, Jun 12, 2018.

  1. YannGROS

    YannGROS

    Joined:
    Apr 9, 2018
    Posts:
    15
    Hi guys,

    I'm currently developing an application on the Hololens using the HoloToolKit. I wanted to go further and decided to use MathNet.Numerics package. Everything was working perfectly on "play mode", but I tried to build it, and I've got those errors :

    - Assets\Packages\HoloToolKitPackages\HoloToolkit\Input\Scripts\Utilities\MicrophoneHelper.cs(65,52): error CS1983: The return type of an async method must be void, Task or Task<T>
    - Assets\Packages\HoloToolKitPackages\HoloToolkit\Input\Scripts\Utilities\MicrophoneHelper.cs(65,29): error CS0433: The type 'Task<TResult>' exists in both 'System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    - Assets\Packages\HoloToolKitPackages\HoloToolkit\Input\Scripts\Utilities\MicrophoneHelper.cs(128,40): error CS1983: The return type of an async method must be void, Task or Task<T>
    - Assets\Packages\HoloToolKitPackages\HoloToolkit\Input\Scripts\Utilities\MicrophoneHelper.cs(128,29): error CS0433: The type 'Task<TResult>' exists in both 'System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    - Assets\Packages\HoloToolKitPackages\HoloToolkit\Utilities\Scripts\ApplicationViewManager.cs(39,46): error CS0433: The type 'ConcurrentDictionary<TKey, TValue>' exists in both 'System.Collections.Concurrent, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
    - Error building Player because scripts had compiler errors
    - Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    - UnityEditor.BuildPlayerWindow+BuildMethodException: 6 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:182
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:89
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    In my MathNet package folder, I've got the MathNet.Numerics.dll and System.Threading.dll. Unity doesn't recognize MathNet.Numerics.dll without System.Threading.dll, but this System.Threading.dll seems to be the problem with the HoloToolKit.

    I'm not used to dll, so I have no clue how to fix it...

    Unity 2018.1.0f2