Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build the plugin with Unity 2017.2f1 #134

Closed
demonixis opened this issue Sep 26, 2017 · 12 comments
Closed

Can't build the plugin with Unity 2017.2f1 #134

demonixis opened this issue Sep 26, 2017 · 12 comments

Comments

@demonixis
Copy link

@demonixis demonixis commented Sep 26, 2017

Hello,

I try to make a build for the store but it's impossible because of errors during the begining of the build phase. My setup

  • Unity 2017.2f1
  • Using the .Net 3.5 Scripting backend
  • .Net 4.6 API compatibility
  • IL2CPP (because the Post Processing Stack v2 is incompatible without it)
  • Package 1707 QFE 4 Release

Errors

There are the error I got

Assets\Vendors\Xbox Live\Scripts\Stats\StatsManagerComponent.cs(40,34): error CS0012: The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Assets\Vendors\Xbox Live\Scripts\UserProfile.cs(184,65): error CS0012: The type 'Task<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Assets\Vendors\Xbox Live\Scripts\UserProfile.cs(190,61): error CS0012: The type 'Task<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Assets\Vendors\Xbox Live\Scripts\UserProfile.cs(202,17): error CS0012: The type 'Task' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Assets\Vendors\Xbox Live\Scripts\UserProfile.cs(217,21): error CS0012: The type 'List<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

DLL configuration

Folder Libs\Unity

  • All DLLs are set to Editor in the included platforms

Folder Libs\UWP

  • All DLLs are set to Standalone and WSAPlayer

I hope we can fix that quickly because I can't continue my beta test on the Windows/Xbox platforms (I can remove the plugin but it can be nice to find a solution).

Thank you for your time.

@jasonsandlin
Copy link
Member

@jasonsandlin jasonsandlin commented Sep 26, 2017

I think this is the same issue as #94

@demonixis
Copy link
Author

@demonixis demonixis commented Sep 26, 2017

Not sure because I don't use the .Net 4.6 Scripting backend, I've switched back to the stable runtime.

@demonixis
Copy link
Author

@demonixis demonixis commented Sep 27, 2017

I can confirm this is not the same issue. In #94 the user uses the .net 4.6 Scripting backend which is experimental as well as the .Net 4.6 API compatibility. This is not what I use. I use the recommanded settings. Can you give it a try with Unity 2017.2f1 and IL2CPP please? Thank you

@SimonDarksideJ
Copy link

@SimonDarksideJ SimonDarksideJ commented Sep 27, 2017

I've just installed 2017.2f1 last night. So I'll start up my test app and try it

@SimonDarksideJ
Copy link

@SimonDarksideJ SimonDarksideJ commented Sep 27, 2017

Ok, so this is a very odd situation and sadly it all falls in Unity's court.

  • if you include the Editor DLL mocks for Tasks, then an IL2CPP build complains there is a conflict between Unity.Tasks and MSCORLIB
  • If you do not include the editor dll mocks, then IL2CPP builds complain of missing references to BOTH System.Threading.Tasks and System.Collections.Generic (for List<> support)

This is some strange voodoo logic here. Can the MS team talk to the Unity team here and see what is going on? Currently IL2CPP builds are incompatible with the XBL package, and several key new features are only supported on UWP with IL2CPP. SO we are at an impass.

@jasonsandlin
Copy link
Member

@jasonsandlin jasonsandlin commented Sep 27, 2017

Thanks for the detail. We'll take a look

@SimonDarksideJ
Copy link

@SimonDarksideJ SimonDarksideJ commented Oct 1, 2017

FYI, the other Xbox Live repo has a method that works for callng Xbox Live services with a IL2CPP project, as detailed here.
Could this be used @jasonsandlin ?
https://docs.microsoft.com/en-us/windows/uwp/xbox-live/get-started-with-partner/partner-unity-uwp-il2cpp

@jasonsandlin
Copy link
Member

@jasonsandlin jasonsandlin commented Oct 2, 2017

It will work, but we don't have any docs or samples to support Creators using this path so its not recommended. The main issue is that path which uses our WinRT dll with IL2CPP can't be used Unity editor, so our prefabs which call APIs that use mock data in the editor won't work with this path.

We will be digging into this issue soon so we're hoping to get our Creators Unity plugin properly supporting IL2CPP.

@SimonDarksideJ
Copy link

@SimonDarksideJ SimonDarksideJ commented Oct 3, 2017

It's certainly a different approach, using the Interop method instead of embedding Xbox Live code in the Unity project. To be honest, with Unity, it is the better path.
Have an abstraction between the GUI / Data stored in Unity and keep all the interactions / actions IN the platform.

@skyworxx
Copy link

@skyworxx skyworxx commented Oct 23, 2017

Hello, I am running into the same problem. Is there a workaround for it?

@Perksey
Copy link

@Perksey Perksey commented Dec 12, 2017

What I did to fix this was set the API Compatibility to .NET 2.0 and then deleted mscorlib in Visual Studio. Once you've done all that, close down Visual Studio and reopen it via Open C# Project in Unity. The .NET 3.5 mscorlib is then added in.

Note that i am using .NET scripting backend not IL2CPP.

@jplafonta
Copy link
Contributor

@jplafonta jplafonta commented Jan 6, 2018

For those of you wanting support for IL2CPP scripting backend, the 1802 preview release does support that so you are welcome to try. Just be aware that there was significant design overhaul with this release and you may run into some issues. If you do choose to try it, just log any issues you find here on github.

@jplafonta jplafonta closed this Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.