Search Unity

Duplicate Task Definitions - UWP Build (Xbox One)

Discussion in 'Windows' started by HaddicusGames, Oct 16, 2017.

  1. HaddicusGames

    HaddicusGames

    Joined:
    May 28, 2014
    Posts:
    28
    I'm trying to build for Xbox One release - and am getting errors related to the type "Task" being defined in both Unity.Tasks Version 0.0.0.0 and System.Threading.Tasks. If I remove the reference to the Unity.Tasks, then it errors stating I need this reference. Initially thought it might have something to do with my project, but I created a new project, with nothing contained, and added the plugin, get the same errors. I got the plugin from:

    https://github.com/Microsoft/xbox-live-unity-plugin/releases/tag/v1707qfe4

    Utilizing:
    Unity 2017.2.0f3
    VS 2017 15.4.0
     

    Attached Files:

    • task.PNG
      task.PNG
      File size:
      46.3 KB
      Views:
      802
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    You need to remove Unity.Tasks.dll from your project and recompile any DLLs that reference Unity.Tasks.dll to not reference it, and instead reference System.Threading.Tasks.
     
  3. demonixis

    demonixis

    Joined:
    Aug 20, 2013
    Posts:
    185
    If anyone have success with that I would love a working build. I tried to recompile the Xbox Live Unity plugin without Unity.Tasks.dll but it fails on building with IL2CPP because it's referenced elsewhere
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    What is it referenced from?
     
  5. demonixis

    demonixis

    Joined:
    Aug 20, 2013
    Posts:
    185
    Unity.Tasks.dll, the Xbox Live team are on it but nothing moved for many weeks now.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    I mean what is referencing that DLL?
     
  7. demonixis

    demonixis

    Joined:
    Aug 20, 2013
    Posts:
    185
    The Xbox Live SDK for Unity. But even by recompiling the SDK without any references to this dll, it doesn't work because the generated UWP solution ask for it. It's easy to try, try to use the Xbox Live SDK with Unity 2017.2, there are issues on github about this.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    That makes no sense... if nothing references Unity.Tasks.dll, then Visual Studio will not complain about it being missing. I'd try using ILSpy and inspecting the DLLs referenced by the VS project to see which one has reference to Unity.Tasks.dll.
     
  9. Mullan7

    Mullan7

    Joined:
    May 23, 2013
    Posts:
    79
    I ran into this problem. Changing the scripting runtime in the editor to stable NET 3.5 fixed it for me
     
  10. GIRsMySpritAnimal

    GIRsMySpritAnimal

    Joined:
    Jan 13, 2017
    Posts:
    45
    It didn't for me. I can't export anything to standalones now
     
  11. GIRsMySpritAnimal

    GIRsMySpritAnimal

    Joined:
    Jan 13, 2017
    Posts:
    45
    How do I remove it and recompile everything?