windows 10 universal SDK and il2cpp

Hi

I have a windows 8.1 machine with unity 5.3.0f4.
I am trying to port my app to Universal 10 SDK.
I faced a lot of problems due to missing classes in .NET, so I switched to il2cpp

I get the following error.

Failed running E:\Program Files\Unity5.3.0f4\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out “D:\path\Temp\StagingArea\Data\Managed empStrip” -l none -c link -b False -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Core.xml” -f “E:\Program Files\Unity5.3.0f4\Editor\Data\il2cpp\LinkerDescriptors” -x “D:\path/Temp\StagingArea\Data/methods_pointedto_by_uievents.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\AI.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Animation.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Audio.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\CloudWebServices.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Core.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\IMGUI.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\JSONSerialize.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ParticlesLegacy.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ParticleSystem.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Physics.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Physics2D.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Terrain.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\TerrainPhysics.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\TextRendering.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UI.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UNET.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityAds.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityAnalytics.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityConnect.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityWebRequest.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\VR.xml” -x “E:\Program Files\Unity5.3.0f4\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Web.xml” -x “path\Assets\link.xml” -d “path\Temp\StagingArea\Data\Managed” -a “path\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll” -a “path\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll” -a “path\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll” -a “path\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll” -a “path\Temp\StagingArea\Data\Managed\Tapjoy.dll”

stdout:
Fatal error in Mono CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: ‘Microsoft.Phone, Version=8.0.0.0, Culture=neutral, PublicKeyToken=24eec0d8c86cda1e’
at Mono.Linker.LinkContext.Resolve(IMetadataScope scope)
at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences(AssemblyDefinition assembly)
at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences(AssemblyDefinition assembly)
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at Mono.Linker.Driver.RunDriver(Driver driver)
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:94)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:107) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable1, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:100)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String, String, String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:131)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:201)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:128)
PostProcessUAPIl2Cpp:RunIL2CPP() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPIl2Cpp.cs:92)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:131)
UnityEditor.HostView:OnGUI()

The projects just compiles fine on iOS, which I guess uses the same il2cpp.

Any helps is greatly appreciated.

Hi,

it seems that one of your plugins is referencing Microsoft.Phone.dll, which is NOT available in the .NET 3.5 profile that Unity uses for all IL2CPP platforms. This particular assembly is only available when targeting Windows Phone 8.0, and using .NET scripting backend. The plugin that is referencing this DLL is not compatible with any other platform.

The easiest way to solve your issue is to mark the DLL in question to not be compatible with “Windows Store” platform in the plugin inspector. If you can successfully build for iOS, then the plugin is already marked as not compatible with iOS, so you merely need to apply the same setting for Windows Store.

You can read about what kind of plugins are currently supported on IL2CPP scripting backend here:

http://docs.unity3d.com/Manual/windowsstore-plugins-il2cpp.html