Universal Windows Platform - Build Error

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
Dak_796
Posts: 8
Joined: Sat Apr 15, 2017 6:08 pm

Universal Windows Platform - Build Error

Post by Dak_796 »

Hi,
This has me stumped- I am sure there is something I have setup wrong, but not sure what.
In an empty unity project, I only import ES2 (it builds without importing ES2).


Unity 2017.2.0f3
Player settings-
Scripting Runtime Version .net 4.6
Scripting Backend: IL2CPP
Api Compatibility: .NET 4.6

Thanks for any point in the right direction!

The error attempting to build UWP:

Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/UnityLinker.exe --api=NET_4_6 -out="C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\tempStrip" -l=none -c=link --link-symbols -x="C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Core.xml" -f="C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Users\Public\Documents\Unity Projects\Projects\testproject/Temp\StagingArea\Data/methods_pointedto_by_uievents.xml" -x "C:\Users\Public\Documents\Unity Projects\Projects\testproject/Temp\StagingArea\Data/UnityEngine.xml" -x "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\preserved_derived_types.xml" -x "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors\mscorlib45.xml" -x "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors\System45.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Accessibility.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\AI.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Animation.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\AR.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Audio.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Cloth.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Core.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\CrashReporting.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Director.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\GameCenter.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Grid.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ImageConversion.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\IMGUI.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Input.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\JSONSerialize.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ParticlesLegacy.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ParticleSystem.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\PerformanceReporting.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Physics.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Physics2D.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\ScreenCapture.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\SpriteMask.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\StyleSheets.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Terrain.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\TerrainPhysics.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\TextRendering.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Tilemap.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UI.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UIElements.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UNET.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityAnalytics.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityConnect.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityWebRequest.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityWebRequestAudio.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityWebRequestTexture.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\UnityWebRequestWWW.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Vehicles.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Video.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\VR.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Web.xml" -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport\Whitelists\Wind.xml" -x "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Assets\link.xml" -d "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\ES2.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.CJK.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.MidEast.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.Other.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.Rare.dll" -a "C:\Users\Public\Documents\Unity Projects\Projects\testproject\Temp\StagingArea\Data\Managed\I18N.West.dll"

stdout:
Fatal error in Unity CIL Linker
System.InvalidProgramException: Failed to resolve [UnityEngine]System.Resources.NeutralResourcesLanguageAttribute.
at Unity.IL2CPP.AssemblyDependenciesComponent.ResolveWindowsRuntimeReferences(AssemblyDefinition assembly)
at Unity.IL2CPP.AssemblyDependenciesComponent.CollectAssemblyDependencies(AssemblyDefinition assembly)
at Unity.IL2CPP.AssemblyDependenciesComponent.GetReferencedAssembliesFor(AssemblyDefinition assembly)
at UnityLinker.UnityLinkContext.ResolveReferences(AssemblyDefinition assembly)
at UnityLinker.Steps.UnityResolveFromXmlStep.GetAssembly(LinkContext context, AssemblyNameReference assemblyName)
at UnityLinker.Steps.UnityResolveFromXmlStep.ProcessAssemblies(LinkContext context, XPathNodeIterator iterator)
at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at UnityLinker.UnityDriver.Run()
at UnityLinker.UnityDriver.RunDriver()
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:128)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:73)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:89)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:82)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:204)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:114)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
PostProcessUAPIl2Cpp:RunIL2CPP() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPIl2Cpp.cs:394)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:222)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

User avatar
Joel
Moodkie Staff
Posts: 3676
Joined: Wed Nov 07, 2012 10:32 pm

Re: Universal Windows Platform - Build Error

Post by Joel »

Hi there,

As .NET 4.6 is still experimental, and Unity are still yet to resolve bugs at their end which we cannot work around, we are not currently supporting .NET 4.6.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Dak_796
Posts: 8
Joined: Sat Apr 15, 2017 6:08 pm

Re: Universal Windows Platform - Build Error

Post by Dak_796 »

Hi Joel,
I switched to:
Scripting Backend Stable (.Net 3.5)
Api Compatibility Level .NET 2.0

And still get errors- is there a setup that should work for UWP?


------

UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\Data\Managed\ES2.dll" --additionalreferences="Temp\StagingArea\Data\Managed" --platform="C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Facade\Windows.winmd" --dbg=pdb --framework="Temp\StagingArea\Data\Managed" --alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,WindowsBase;System.Collections.Specialized,System;System.Collections.Specialized,WindowsBase;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.ServiceModel.Web;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Principal,mscorlib;System.ServiceModel,System.ServiceModel;System.ServiceModel.Channels,System.ServiceModel;System.ServiceModel.Description,System.ServiceModel;System.ServiceModel.Dispatcher,System.ServiceModel;System.ServiceModel.Security,System.ServiceModel;System.ServiceModel.Security.Tokens,System.ServiceModel;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml --ignore=System.IConvertible,mscorlib.
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFolder` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFolder` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `Windows.Storage.StorageFile` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Collections.Generic.IReadOnlyList`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Error: type `System.Threading.Tasks.Task`1` doesn't exist in target framework. It is referenced from ES2.dll at System.String[] ES2DirectoryUtility::GetFiles(System.String,System.String).
Catastrophic failure while running rrw: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Threading.Tasks, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Unity.SearchPathAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) in c:\u\cecil\Mono.Cecil\MetadataResolver.cs:line 103
at Mono.Cecil.MetadataResolver.Resolve(MethodReference method) in c:\u\cecil\Mono.Cecil\MetadataResolver.cs:line 213
at Mono.Cecil.MethodReference.Resolve() in c:\u\cecil\Mono.Cecil\MethodReference.cs:line 178
at Unity.ReferenceRewriter.RewriteTypeReferences.Visit(MethodReference method, String referencingEntityName)
at Unity.ReferenceRewriter.ReferenceDispatcher.Visit(MethodReference method, String referencingEntityName)
at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethodBody(MethodBody body)
at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethod(MethodDefinition method)
at Unity.ReferenceRewriter.ReferenceDispatcher.DispatchMethods(TypeDefinition type)
at Unity.ReferenceRewriter.ReferenceDispatcher.Dispatch()
at Unity.ReferenceRewriter.RewriteTypeReferences.Run()
at Unity.ReferenceRewriter.RewriteOperation.Execute(RewriteContext context)
at Unity.ReferenceRewriter.Program.Main(String[] args)

PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:710)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:211)
UnityEditor.WSA.BuildPostprocessor.DoPostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:142)
UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:149)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

User avatar
Joel
Moodkie Staff
Posts: 3676
Joined: Wed Nov 07, 2012 10:32 pm

Re: Universal Windows Platform - Build Error

Post by Joel »

Hi there,

It looks like it's ignoring the UWP plugin and is trying to use the Editor plugin.

Could you select Assets/Plugins/ES2.dll and Assets/Plugins/MoodkieSecurity.dll in the Editor and check that all platforms except UWP are selected in the Inspector, and then do the same for Assets/Plugins/WSA/ES2.dll and Assets/Plugins/WSA/MoodkieSecurity.dll and check that only UWP is selected in the Inspector?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Dak_796
Posts: 8
Joined: Sat Apr 15, 2017 6:08 pm

Re: Universal Windows Platform - Build Error

Post by Dak_796 »

Hi Joel,
Yes, that is the current setup- the WSAPlayer is checked on the two files in the WSA folder. The versions in the root Easy Save 2 folder are enabled for Editor, Standalone, and WebGL - but not WSAPlayer.
The WP8 files are not enabled at all- but I don't think they should be. If I enable them, I get a conflict.
Thanks

User avatar
Joel
Moodkie Staff
Posts: 3676
Joined: Wed Nov 07, 2012 10:32 pm

Re: Universal Windows Platform - Build Error

Post by Joel »

Hi there,

If you haven't done so already, try deleting the build, as it's possible that there's still files left over in the build from when you compiled it with .NET 4.6.

If this doesn't fix your problem, please could you PM me a test project which replicates the error? We don't seem to have had any reports from other users of any issues with UWP, and I've not been able to replicate it at my end.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

Locked