- Home /
Build error with IL2CPP
Hey everyone. I'm using unity 5.2.1f1 and i encounter these errors when trying to build to iOS using IL2CPP Backend. I have tried using both .Net 2.0 and subset but the errors are still there. Here are the errors.
Error 1:
IL2CPP error (no further information about what managed code was being converted is available) Additional information: Build a development build for more information. Failed to resolve assembly: '/Users/bailey/Luke, Version=0.0, Culture=neutral, PublicKeyToken=null'
Error 2:
Failed running /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe --convert-to-cpp --copy-level=None --emit-null-checks --enable-array-bounds-check --extra-types.file="/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/il2cpp_default_extra_types.txt" --assembly="/Users/bailey/Luke, The Ice Cube/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" --assembly="/Users/bailey/Luke, The Ice Cube/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" --assembly="/Users/bailey/Luke, The Ice Cube/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" --assembly="/Users/bailey/Luke, The Ice Cube/Temp/StagingArea/Data/Managed/UnityEngine.dll" --generatedcppdir="/Users/bailey/Luke, The Ice Cube/Temp/il2cppOutput/il2cppOutput"
stdout: IL2CPP error (no further information about what managed code was being converted is available) Additional information: Build a development build for more information. Failed to resolve assembly: '/Users/bailey/Luke, Version=0.0, Culture=neutral, PublicKeyToken=null' il2cpp.exe didn't catch exception: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: '/Users/bailey/Luke, Version=0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.AssemblyLoader.Resolve (IMetadataScope scope) [0x00000] in :0 at Unity.IL2CPP.Common.AssemblyLoader.Load (System.String name) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter+c_AnonStorey1.<>m0 (System.String path) [0x00000] in :0 at System.Linq.Enumerable+c_Iterator10`2[System.String,Mono.Cecil.AssemblyDefinition].MoveNext () [0x00000] in :0 at System.Linq.Enumerable.ToArray[AssemblyDefinition] (IEnumerable`1 source) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.Apply () [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter.ConvertAssemblies (System.String[] assemblies, NiceIO.NPath outputDir) [0x00000] in :0 stderr:
Unhandled Exception: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: '/Users/builduser/Luke, Version=0.0, Culture=neutral, PublicKeyToken=null' at Unity.IL2CPP.Common.AssemblyLoader.Resolve (IMetadataScope scope) [0x00000] in :0 at Unity.IL2CPP.Common.AssemblyLoader.Load (System.String name) [0x00000] in :0 at Unity.IL2CPP.AssemblyConverter+c_AnonStorey1.<>m_0 (System.String path) [0x00000] in :0
Error 3:
Exception: /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe did not run properly! UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (ICollection`1 userAssemblies, System.String outputDirectory, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:399) UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:293) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at /Users/builduser/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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316) UnityEditor.HostView:OnGUI()
If anyone could point me in the right direction i would really appreciate it. Thanks :)
No, we've not been able to track down the cause of this issue yet. If you are seeing something similar, and you can submit a bug report with a reproducible test case, please do so. We will investigate it.
Answer by JoshPeterson · Nov 05, 2015 at 02:55 PM
It looks like il2cpp.exe is expecting to find an assembly in the /Users/bailey/ directory named Luke.dll. It is also looking in the /Users/builduser/ directory for an assembly of the same name. Do assemblies exist at those locations?
Also, you should be able to see the il2cpp.exe command line in the Editor.log file. What arguments are passed to il2cpp.exe? Is this Luke.dll assembly passed explicitly on the command line?
Thanks for replying Josh :) The assembly exists in the /users/bailey/ directory but i can't seem to even find the /users/builduser/ directory :/
The only thing in editor log i can find about il2cpp.exe is: Error building Player: Exception: /Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/build/il2cpp.exe did not run properly!
In the editor log, maybe try search from il2cpp ins$$anonymous$$d of il2cpp.exe. There should be an entry listing the command line arguments.
Also, it might be the case that the /users/bailer/Luke.dll file was not resolved because one of the assemblies it depends on was not available. You maybe able to use a tool like $$anonymous$$onoDevelop or ILSpy (on Windows) to see which assemblies it depends on, and see if any of them are missing from the project.
I checked the folder and all the assemblies it depends on are there. Also this is everything in the editor.log file that i can find on IL2CPP.
> -r:'/Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/Variations/il2cpp/$$anonymous$$anaged/UnityEngine.dll'
> -define:INCLUDE_IL2CPP
> -define:ENABLE_IL2CPP Invoking UnusedByteCodeStripper2 with
> arguments: -out
> "/Users/baileyhunt/Luke, The Ice
> Cube/Temp/StagingArea/Data/$$anonymous$$anaged/tempStrip"
> -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml"
> -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors"
> -x "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/$$anonymous$$anaged/../platform_native_link.xml"
> -x "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml"
> -x "/Users/baileyhunt/Luke, The Ice Cube/Assets/link.xml" -d
> "/Users/baileyhunt/Luke, The Ice
> Cube/Temp/StagingArea/Data/$$anonymous$$anaged" -a
> "/Users/baileyhunt/Luke, The Ice
> Cube/Temp/StagingArea/Data/$$anonymous$$anaged/Assembly-CSharp-firstpass.dll"
> -a "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/$$anonymous$$anaged/Assembly-CSharp.dll"
> -a "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/$$anonymous$$anaged/UnityEngine.UI.dll"
> Invoking UnusedByteCodeStripper2 with
> arguments: -out
> "/Users/baileyhunt/Luke, The Ice
> Cube/Temp/StagingArea/Data/$$anonymous$$anaged/tempStrip"
> -l none -c link -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml"
> -f "/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors"
> -x "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/$$anonymous$$anaged/../platform_native_link.xml"
> -x "/Users/baileyhunt/Luke, The Ice Cube/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/Animation.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/Audio.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/Physics.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/Physics2D.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/TextRendering.xml"
> -x "/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/UI.xml"
> -x
@Berler: It is difficult to tell the cause of this issue still, sorry. Can you submit a bug report with this project?
Answer by RowanG1 · May 13, 2016 at 12:36 PM
Found a solution to a similar problem. I had moved the unity project to a Dropbox folder, which gave rise to the problem. I moved back to another folder, and then the build worked.