- Home /
ERROR in IOS build with IL2CPP scripting backend
I'm using Unity 5.0.1f1
When I try to build my project to ISO whith IL2PP as scripting backend, I have this errors :
Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk\Temp\StagingArea\Data\Managed" -l none -c link -x "C:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk\Temp\StagingArea\Data\Managed..\platform_native_link.xml" -x "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk\Temp\StagingArea\Data\Managed" -a "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "D:\Ktm-Advance\SVN\SANOFI_QC\03_Production\Trunk\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll"
stdout: Fatal error in Mono CIL Linker Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEditor, Culture=neutral, PublicKeyToken=null' at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in :0 at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in :0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in :0 at Mono.Linker.Driver.Run () [0x00000] in :0 at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in :0 stderr:
UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185) UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136) UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121) UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:445) UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:433) UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211) UnityEditor.HostView:OnGUI()
Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly! UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68) UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192) UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185) UnityEditorInternal.AssemblyStripper.Strip (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136) UnityEditorInternal.AssemblyStripper.Strip (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121) UnityEditorInternal.IL2CPPBuilder.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:445) UnityEditorInternal.IL2CPPBuilder.StripAssemblies (System.String[] assemblies, System.String managedAssemblyFolderPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:433) UnityEditorInternal.IL2CPPBuilder.Run () (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:273) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211) UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316) UnityEditor.HostView:OnGUI()
Error building Player: Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
Answer by JoshPeterson · Nov 13, 2015 at 12:35 PM
The key part of the error message is this:
Fatal error in Mono CIL Linker Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEditor, Culture=neutral, PublicKeyToken=null'
This means that something in the scripts or assemblies in your project being built for the player is trying to use a feature available only in the Unity editor. The UnityEditor.dll assembly is not available to the player, so this error occurs.
Maybe the code is missing an #if UNITY_EDITOR
directive somewhere.
I put UNITY_EDITOR #if everywhere UnityEditor is referenced.
I have add no DLLs in the project. But I use a librerie for SocketIO (and SimpleJS). https://github.com/kaistseo/UnitySocketIO-WebSocketSharp
It may be difficult to tell then what is pulling UnityEditor.dll. You may need to try to disable parts of the script code to deter$$anonymous$$e what is causing the problem.
Answer by Lotfi MEZIANI · Nov 13, 2015 at 03:36 PM
I put UNITY_EDITOR #if everywhere UnityEditor is referenced.
I have add no DLLs in the project. But I use a librerie for SocketIO (and SimpleJS). https://github.com/kaistseo/UnitySocketIO-WebSocketSharp
Your answer
Follow this Question
Related Questions
Unity Build IOS XCODE build error ReentrantLock 0 Answers
unity 5.2.4 iOS build error ,iOS build error 0 Answers
Build error with IL2CPP 3 Answers
Interlocked methods crashing with IL2CPP 3 Answers