microsoft / xbox-live-unity-plugin

The Xbox Live Unity Plugin provides a way for developers in the Xbox Live Creators Program to quickly and easily integrate Xbox Live functionality into their Unity based game. For ID@Xbox developers, this Xbox Live Unity Plugin does not yet support all the features you will need. Instead, contact your Microsoft representative.
MIT License
168 stars 55 forks source link

CS0433 error in import in Unity 2018.3.0f2 #264

Open coxlin opened 5 years ago

coxlin commented 5 years ago

Assets\Xbox Live\Scripts\UnityTaskExtensions.cs(13,61): 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'

The above error occurs when I import the package into my project. Any ideas?

tim-neville commented 5 years ago

Had the same issue when using .Net 4.x Scripting Runtime Version (shown in PlayerSettings->OtherSettings->Configuration). The plugin is apparently setup by default to be configured for .Net 3.5. In the below link about half way down there's a gif showing what to do so that he plugin is configured for use with the .Net 4.x runtime.

https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-creators/configure-xbox-live-in-unity#import-the-unity-plugin

We've added additional scripting runtime support to the Xbox Live Unity Plugin, starting with version "1711 Release". By default, the plugin is configured to run in the Unity editor with the .NET scripting backend and scripting runtime version of .NET 3.5. If your project is using the scripting runtime version of .NET 4.6, you will need to configure the plugin to work properly in the editor: