Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Not able to build an iOS build. UnusedBytecodeStripper2.exe did not run properly!

Discussion in 'Editor & General Support' started by mohitkatariya, Sep 26, 2015.

  1. mohitkatariya

    mohitkatariya

    Joined:
    Dec 9, 2014
    Posts:
    3
    Hi, I am getting errors while building an iOS build when scripting backend is IL2CPP but it works fine when the scripting backend is Mono2x. This error occurs after I update unity to 5.2.1f1(Personal). I am using iMac and Unity 5.2.1f1(Personal).

    You can download the project from this link : https://goo.gl/l72hEb

    Please suggest me how to get rid of these errors.

    Thanks.

    Errors :

    --------------Error 1----------------
    Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed/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/mohit/Desktop/we/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/mohit/Desktop/we/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed" -a "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a "/Users/mohit/Desktop/we/Temp/StagingArea/Data/Managed/NGUI.dll"

    stdout:
    ERROR: Failed to resolve base type System.Security.Principal.GenericIdentity for type System.Net.HttpListenerBasicIdentity
    Fatal error in Mono CIL Linker
    System.Exception: ERROR: Failed to resolve base type System.Security.Principal.GenericIdentity for type System.Net.HttpListenerBasicIdentity
    at UnusedBytecodeStripper2.ResolveFromMonoBehaviours.IsMonoBehaviourOrScriptableObject (Mono.Cecil.TypeDefinition type) [0x00000] in <filename unknown>:0
    at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1E`1[Mono.Cecil.TypeDefinition].MoveNext () [0x00000] in <filename unknown>:0
    at UnusedBytecodeStripper2.ResolveFromMonoBehaviours.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
    UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
    UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
    UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:441)
    UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable`1, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:414)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
    UnityEditor.HostView:OnGUI()


    ------------Error 2-------------
    Exception: /Applications/Unity/Unity.app/Contents/Frameworks/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 /Users/builduser/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 /Users/builduser/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 /Users/builduser/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 /Users/builduser/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 /Users/builduser/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 /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:441)
    UnityEditorInternal.IL2CPPBuilder.StripAssemblies (IEnumerable`1 assemblies, System.String managedAssemblyFolderPath) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:414)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
    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()


    -------------- Error 3-----------
    Error building Player: Exception: /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
     
  2. a1fonzo

    a1fonzo

    Joined:
    Mar 28, 2015
    Posts:
    5
    I have been having the same error since updating to Unity 5.2. Currently working on identifying and attempting to solve the problem. Any help is greatly appreciated.
     
  3. a1fonzo

    a1fonzo

    Joined:
    Mar 28, 2015
    Posts:
    5
    Mohit, are you using any third-party plugins in this Unity Project? If so which ones?
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    I wonder if System.Security.Principal.GenericIdentity is being incorrectly stripped from mscorlib.dll. With the Mono scripting backend, is stripped disabled? If so, it may be necessary to use a link.xml file to ensure that the mscorlib.dll assembly is not stripped. You can find some details about how to do this here:

    http://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html
     
  5. a1fonzo

    a1fonzo

    Joined:
    Mar 28, 2015
    Posts:
    5
    I found another post with a similar problem that had a valid workaround. I used it and my project is building fine. I was unable to diagnose the exact cause of the problem but this is what solved it.

    1) Change stripping backend from il2cpp to Mono in build settings
    2) Change stripping level to 'strip byte code'
    3) Revert stripping backend to il2cpp

    I can't find the forum post that describes this workaround but this is what solved the problem.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @a1fonzo

    Did you happen to have the stripping level set to "Use micro mscorlib" in the Mono player settings? If so, then this is a known bug that we have corrected in the latest 5.2 patch release. If not, then we have another, different bug that we need to correct.
     
  7. echo2300

    echo2300

    Joined:
    Apr 4, 2015
    Posts:
    5
    i happen to have the stripping level set to "use micro mscorlib", i follow the steps above and solved the problem.
     
  8. yuwen-lian

    yuwen-lian

    Joined:
    Sep 25, 2015
    Posts:
    5
    Hi I'm also having the similar issue and still cannot solve the problem even after trying the workaround from @a1fonzo

    p.s. I'm currently using Unity5.2.1p2
     
    Last edited: Nov 21, 2015
  9. mattSydney

    mattSydney

    Joined:
    Nov 10, 2011
    Posts:
    166
    I' having this problem in Unity 4.6.9.f1 I cannot build to ios on any stripping level, even disabled
     
  10. D3m0n

    D3m0n

    Joined:
    Nov 11, 2014
    Posts:
    74
    Same problem. No damn solution!?
     
  11. khokhani1510

    khokhani1510

    Joined:
    Jun 26, 2013
    Posts:
    36

    @a1fonzo thanks, i followed the above steps and its working fine!
     
  12. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    83
    I got similar error when I tried to run my project in WebGL: I fixed it by:

    I found the solution by copy pasting the error into notebook++.

    Failed running C:\Unity5\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out
    stdout:

    etc etc...

    Fatal error in Mono CIL Linker
    System.Exception: Error processing method: 'UnityEngine.AudioClip ES2Reader::Read_AudioClip()' in assembly: 'ES2.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void UnityEngine.AudioClip::SetData(System.Single[],System.Int32)

    etc.

    The ES2 was Easy Save 2. The author had an update. Updated and then the error went away. Others may have a different dll that it has an issue with.
     
  13. Game-Masons

    Game-Masons

    Joined:
    Jan 29, 2016
    Posts:
    1
    I had to up my versioning to iOS 8 from iOS 7.
     
  14. prabushan

    prabushan

    Joined:
    Mar 16, 2016
    Posts:
    8
    I am having the same issue. I been trying to fix it but still it fails during the Build for WebGL.
    Unity Version : 5.3.3f

    Thank You

    _-------------------------------------------------------
    Here is the error message below.
    Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\tempStrip" -l none -c link -b False -x "C:\Program Files\Unity\Editor\Data\PlaybackEngines\WebGLSupport\Whitelists\Core.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\EBS2\EBS Unity/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "C:\EBS2\EBS Unity\Temp\StagingArea\Data\preserved_derived_types.xml" -d "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Bluedrop.EPSS3D.Common.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\Bluedrop.EPSS3D.Runtime.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\HighlightingSystem.dll" -a "C:\EBS2\EBS Unity\Temp\StagingArea\Data\Managed\NGUI.dll"

    stdout:
    Fatal error in Mono CIL Linker
    System.Exception: Error processing method: 'System.Void HighlightableObject::InitMaterials()' in assembly: 'HighlightingSystem.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.ClothRenderer
    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
    at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.MarkStep.ProcessQueue()
    at Mono.Linker.Steps.MarkStep.Process()
    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(IEnumerable`1, 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, IEnumerable`1, 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:204)
    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, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:135)
    UnityEditor.PostprocessBuildPlayer : ostprocess(BuildTarget, String, String, String, Int32, Int32, String, String, BuildOptions, RuntimeClassRegistry)
     
  15. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @prabushan

    Amidst all of this output, the important error message is:

    'System.Void HighlightableObject::InitMaterials()' in assembly: 'HighlightingSystem.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.ClothRenderer

    It looks like the UnityEngine.ClothRenderer type is not being found. I'm not entirely sure why. You could have a look at the UnityEngine.dll assembly in ILSpy and see if it has a ClothRenderer type. It may be the case that HighlightingSystem.dll was built with a different version of Unity than you are currently using to build this project.
     
  16. prabushan

    prabushan

    Joined:
    Mar 16, 2016
    Posts:
    8
    Thank You Josh Peterson.

    I will check that out.
    1. The project was created in 2013/2014 by another company. The project worked fine with old Web Player but after an updates to the Web Player, there is minor errors in the project.
    2. Now I have the new version of Unity and I was trying to build the project using the WebGL so its works with all the browser without the web player.

    I am new to Unity, and I am not familiar with all the settings yet.
     
  17. GRSimbite

    GRSimbite

    Joined:
    Sep 8, 2015
    Posts:
    24
    Hi all I had same problem and such steps fixed it:

    [I was on iOS platform]
    1. Delete link.xml
    2. switch to other platform
    3. switch back to iOS platform

    Above fixed this one for me, hope it will help others.
     
  18. Christin2015

    Christin2015

    Joined:
    Dec 1, 2015
    Posts:
    11
    THANKS! I have just run into the same issue. Your workaround helped.
     
  19. Jelmersb

    Jelmersb

    Joined:
    Jul 12, 2016
    Posts:
    21
    For me, just deleting link.xml was enough :)
     
  20. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    180
    Tried mentioned methods above, did not solve problem for me.
     
  21. alex181189

    alex181189

    Joined:
    Sep 27, 2016
    Posts:
    4
    Thanks!!
     
  22. AngelSilverwings

    AngelSilverwings

    Joined:
    Apr 27, 2014
    Posts:
    1
    Thanks!
    Now I can compile :)
     
  23. LT23Live

    LT23Live

    Joined:
    Jul 8, 2014
    Posts:
    4
    This did not fix my issue. What else could it be?
     
  24. vanshika1012

    vanshika1012

    Joined:
    Sep 18, 2014
    Posts:
    24
    I have tried all the method. I am using Unity 5.5 . I am getting following errors:-

    Error 1

    Failed running /Applications/Unity5.5/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0 -out "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity5.5/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/vanshika/Desktop/S_Game/Assets/link.xml" -x "/Users/vanshika/Desktop/S_Game/Assets/FacebookSDK/link.xml" -x "/Users/vanshika/Desktop/S_Game/Assets/Standard Assets/VoxelBusters/NativePlugins/link.xml" -d "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed" -a "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/vanshika/Desktop/S_Game/Temp/StagingArea/Data/Managed/Facebook.Unity.Settings.dll"

    stdout:
    Fatal error in Mono CIL Linker
    System.ArgumentException: Unable to find the file for the assembly named 'Facebook.Unity.Android' specified in link file '/Users/vanshika/Desktop/S_Game/Assets/link.xml'. Should this assembly be in the project? Use the 'ignoreIfMissing="1"' attribute if this assembly may not always exist. ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Facebook.Unity.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
    at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) <0x10a58e9b0 + 0x000e9> in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) <0x10a58e150 + 0x00036> in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) <0x10a58d0a0 + 0x0009e> in <filename unknown>:0
    --- End of inner exception stack trace ---
    at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) <0x10a58d0a0 + 0x003b0> in <filename unknown>:0
    at Mono.Linker.Steps.ResolveFromXmlStep.Process () <0x10a58c6d0 + 0x0008b> in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x10a58c5a0 + 0x0006b> in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x10a58b660 + 0x000e6> in <filename unknown>:0
    at Mono.Linker.Driver.Run (IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x108b7b430 + 0x00be7> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x108b7b3e0 + 0x00026> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x108b7b2f0 + 0x0003b> in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:118)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
    UnityEditor.HostView:OnGUI()


    Error 2

    Exception: /Applications/Unity5.5/Unity.app/Contents/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, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:118)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
    UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:664)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:507)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:478)
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)
    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, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
    UnityEditor.HostView:OnGUI()
     
  25. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @vanshika1012

    If looks like you might be seeing a slightly different error than those originally discussed in this thread. It seems the key part of the error message is this:

    System.ArgumentException: Unable to find the file for the assembly named 'Facebook.Unity.Android' specified in link file '/Users/vanshika/Desktop/S_Game/Assets/link.xml'. Should this assembly be in the project? Use the 'ignoreIfMissing="1"' attribute if this assembly may not always exist.

    So, is there a file named Facebook.Unity.Android.dll in this project? It looks like you are building for iOS, so I suspect that file (which seems to be related to Android) is not present.

    To correct this issue, you can probably modify the file /Users/vanshika/Desktop/S_Game/Assets/link.xml and remove the entries for Facebook.Unity.Android.dll or add the ignoreIfMissing attribute to them.
     
  26. halimozturk

    halimozturk

    Joined:
    Dec 1, 2012
    Posts:
    8
    I also followed these instructions and it worked fine for me too. Thank you very much
     
  27. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @halimozturk

    I'm curious about which version of Unity you are using that required these three steps. The bug which this procedure worked around was fixed a while ago, if I recall correctly. I'm worried that it may be back in a newer Unity version.
     
  28. RazorCut

    RazorCut

    Joined:
    May 7, 2009
    Posts:
    394
    I'm trying to build something out to iOS with 5.5.0f3, IL2CPP and I'm getting a similar failure:

    Looks like it's having some issue with "Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture"

    Though when I switch to Mono2x, I get this, and is very different:

     
  29. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @RazorCut

    Both the issues with IL2CPP and Mono stem from the same root cause. The problem is that the Vuforia.UnityExtensions.dll uses the UnityEngine.RenderTexture::set_generateMips property. This property was renamed to be UnityEngine.RenderTexture::set_autoGenerateMips in Unity 5.5.

    In the IL2CPP toolchain, we have a fix for this issue that prevents the first error from occurring. That fix will be available in the 5.5.1p1 patch release of Unity.

    However, the fundamental problem still remains. The API Updater in Unity should be able to modify the Vuforia.UnityExtensions.dll assembly properly to use the new property instead of the old one. This should have happened the first time you opened the project with a new version of Unity. However, you can do it manually by selecting the Vuforia.UnityExtensions.dll assembly in the project tab, and choosing the "Reimport" option from the right mouse button menu. The API Updater should run for this assembly and correct it.
     
    AM-Dev and NoZain like this.
  30. RazorCut

    RazorCut

    Joined:
    May 7, 2009
    Posts:
    394
    Awesome, that did the trick for me. Makes perfect sense too. Thanks!
     
  31. sergioabril

    sergioabril

    Joined:
    Jan 11, 2016
    Posts:
    6
    Hi guys, I'm having a similar error with UnusedBytecodeStripper2.exe. I just updated a 3rd party asset, ProBuilder, and I'm having these errors since then. (I've already notified the authors)
    (Note that I'm on Mac OS trying to build for iOS, and I'm not sure if it's even logical to get errors regarding .exe files)

    I'm getting 4 errors, ordered like shown on the attached picture.

     

    Attached Files:

  32. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @sergioabril

    This is actually an error which is similar to, but independent from the problem with the Vuforia plugin. We have an existing bug on this issue which you can track here: https://issuetracker.unity3d.com/issues/il2cpp-unable-to-access-core-dot-xml-when-building-for-ios

    I'm not sure if something changes in the ProBuilder package recently, or this is a bug on the Unity side yet. The issue seems to be that the ProBuilder asset has some assemblies in the ProBuilder/Classes/ClassesLib directory. Unity is not correctly finding the assemblies in the ClassesLib directory, which leads to this error message.

    You might be able to work around the issue by copying the assemblies from ClassesLib up the the Classes directory. But I'm not certain that is a viable solution. We'll continue to investigate this to attempt to track down its cause.
     
    sergioabril likes this.
  33. plysaght47

    plysaght47

    Joined:
    Jul 2, 2015
    Posts:
    21


    I was having this same issue with Vuforia. Manually updating the assembly as you suggested corrected the issue. Thanks.
     
    NoZain likes this.
  34. halimozturk

    halimozturk

    Joined:
    Dec 1, 2012
    Posts:
    8
    On that project I was using 5.2.1f1 personal
     
  35. vanshika1012

    vanshika1012

    Joined:
    Sep 18, 2014
    Posts:
    24
    same problem with Unity 5.5 . Application running fine on Android.


    Failed running /Applications/Unity5.5/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity5.5/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/AI.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Animation.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Audio.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Cloth.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/CrashReporting.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/IMGUI.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/JSONSerialize.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/ParticleSystem.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/ParticlesLegacy.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Physics.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Physics2D.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Terrain.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/TerrainPhysics.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/TextRendering.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UI.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UNET.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UnityAds.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UnityAnalytics.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UnityConnect.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequest.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/VR.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Vehicles.xml" -x "/Applications/Unity5.5/PlaybackEngines/iOSSupport/Whitelists/Web.xml" -d "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed" -a "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll" -a "/Users/vanshika/Documents/ii/Temp/StagingArea/Data/Managed/DOTween.dll"

    stdout:
    SweepReport:
    System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
    Mono.Cecil.MethodDefinition => System.Void .ctor()System.Void .ctor(System.String)System.String get_Comment()System.Void .ctor()System.Boolean get_CanTransformMultipleBlocks()
    Mono.Cecil.FieldDefinition => System.String commentSystem.Func`3<System.Int32,System.Int32,System.Int32> <>f__am$cache0System.Func`3<System.Int64,System.Int64,System.Int64> <>f__am$cache1System.Func`3<System.Double,System.Double,System.Double> <>f__am$cache2System.Func`3<System.Single,System.Single,System.Single> <>f__am$cache3
    Fatal error in Mono CIL Linker
    System.ArgumentException: Member 'DG.Tweening.Core.TweenerCore`3' is declared in another module and needs to be imported
    at Mono.Cecil.MetadataBuilder.LookupToken (IMetadataTokenProvider provider) <0x1105edca0 + 0x0026a> in <filename unknown>:0
    at Mono.Cecil.SignatureWriter.MakeTypeDefOrRefCodedRID (Mono.Cecil.TypeReference type) <0x1105efbd0 + 0x0002c> in <filename unknown>:0
    at Mono.Cecil.SignatureWriter.WriteTypeSignature (Mono.Cecil.TypeReference type) <0x1105ee830 + 0x001cd> in <filename unknown>:0
    at Mono.Cecil.SignatureWriter.WriteMethodSignature (IMethodSignature method) <0x1105ee4f0 + 0x00299> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.GetMethodSignature (IMethodSignature method) <0x1105ee3d0 + 0x000e8> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.AddMethod (Mono.Cecil.MethodDefinition method) <0x1105eb740 + 0x000cf> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.AddMethods (Mono.Cecil.TypeDefinition type) <0x1105eb6a0 + 0x00061> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.AddType (Mono.Cecil.TypeDefinition type) <0x1105e8f90 + 0x0022b> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.AddTypeDefs () <0x1105e8ef0 + 0x00061> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.BuildTypes () <0x1105e8950 + 0x00049> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.BuildModule () <0x1105e5a00 + 0x0013b> in <filename unknown>:0
    at Mono.Cecil.MetadataBuilder.BuildMetadata () <0x1105e59a0 + 0x00017> in <filename unknown>:0
    at Mono.Cecil.ModuleWriter.<BuildMetadata>b__0 (Mono.Cecil.MetadataBuilder builder, Mono.Cecil.MetadataReader _) <0x1105e5970 + 0x0001b> in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (Mono.Cecil.TItem item, System.Func`3 read) <0x10d69aa60 + 0x00078> in <filename unknown>:0
    at Mono.Cecil.ModuleWriter.BuildMetadata (Mono.Cecil.ModuleDefinition module, Mono.Cecil.MetadataBuilder metadata) <0x1105e5840 + 0x000fd> in <filename unknown>:0
    at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) <0x11058a210 + 0x0023c> in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) <0x11058a0d0 + 0x0006f> in <filename unknown>:0
    at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) <0x11058a020 + 0x00055> in <filename unknown>:0
    at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) <0x110589fd0 + 0x00035> in <filename unknown>:0
    at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) <0x110589810 + 0x000db> in <filename unknown>:0
    at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) <0x1105897e0 + 0x00019> in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x10d6851f0 + 0x000b1> in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x10d6842b0 + 0x000e6> in <filename unknown>:0
    at Mono.Linker.Driver.Run (IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10af46520 + 0x00be7> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10af464d0 + 0x00026> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10af463e0 + 0x0003b> in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:118)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
    UnityEditor.HostView:OnGUI()
     
  36. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @vanshika1012

    I've not seen this error before. It looks like the problem is this:

    System.ArgumentException: Member 'DG.Tweening.Core.TweenerCore`3' is declared in another module and needs to be imported

    Is that type one that should be used in the project? If so, there might be an error on the Unity side here. Can you submit a bug report?
     
  37. PhilAR

    PhilAR

    Joined:
    Jul 18, 2015
    Posts:
    3
    Thank you for this post!!
     
  38. s1gh7

    s1gh7

    Joined:
    Oct 13, 2016
    Posts:
    2
    Hi,
    i get a similar error after updating to Unity 5.5.0f3 for MacOS. I want to build the project for iOS und get the error:

    Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "ProjectFolder/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "ProjectFolder/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "ProjectFolder/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "ProjectFolder/Temp/StagingArea/Data/preserved_derived_types.xml" -x "ProjectFolder/Assets/link.xml" -d "ProjectFolder/Temp/StagingArea/Data/Managed" -a "ProjectFolder/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "ProjectFolder/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "ProjectFolder/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"



    stdout:

    SweepReport:

    System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition

    Mono.Cecil.MethodDefinition => System.Void .ctor()System.Void .ctor(System.String)System.String get_Comment()System.Void .ctor()System.Boolean get_CanTransformMultipleBlocks()

    Mono.Cecil.FieldDefinition => System.String commentSystem.Func`3<System.Int32,System.Int32,System.Int32> <>f__am$cache0System.Func`3<System.Int64,System.Int64,System.Int64> <>f__am$cache1System.Func`3<System.Double,System.Double,System.Double> <>f__am$cache2System.Func`3<System.Single,System.Single,System.Single> <>f__am$cache3

    Fatal error in Mono CIL Linker

    Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture

    at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x107887b00 + 0x002fd> in <filename unknown>:0

    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x104a372b0 + 0x0006b> in <filename unknown>:0

    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x104a36370 + 0x000e6> in <filename unknown>:0

    at Mono.Linker.Driver.Run (IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x101ae4430 + 0x00be7> in <filename unknown>:0

    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x101ae43e0 + 0x00026> in <filename unknown>:0

    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x101ae42f0 + 0x0003b> in <filename unknown>:0

    stderr:



    UnityEngine.Debug:LogError(Object)

    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)

    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)

    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)

    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)

    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)

    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:118)

    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)

    UnityEditor.HostView:OnGUI()


    Error 2: (appears twice)
    Exception: /Applications/Unity/Unity.app/Contents/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, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)

    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)

    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)

    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)

    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)

    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:118)

    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean developmentBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)

    UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:664)

    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:507)

    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:478)

    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)

    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, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)

    UnityEditor.HostView:OnGUI()



    Thanks for your help,
    Stephan
     
  39. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @s1gh7

    Are you using the Vuforia plugin? If so, see this post above in the thread. It looks like the solution to the same problem you have:

    https://forum.unity3d.com/threads/n...exe-did-not-run-properly.357447/#post-2919085
     
  40. Dekata

    Dekata

    Joined:
    May 20, 2016
    Posts:
    34
    @JoshPeterson I also get issue with this, im using Google Admob and Dotween plugin and i think because of this. but still stuck at there.
     
  41. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    Are there any managed plugins that need to be updated for the new Unity API? It might not be only the Vuforia plugin that causes an issue.
     
  42. Dekata

    Dekata

    Joined:
    May 20, 2016
    Posts:
    34
    @JoshPeterson thanks for your advice. it is becoz of DoTween, i got both (standard and pro version) just remove one, dotween error will be fix. but i still have the other:
    Code (CSharp):
    1. Win32Exception: ApplicationName='gem', CommandLine='environment', CurrentDirectory='D:\Examp\Unity\Solitaire'
    2. System.Diagnostics.Process.Start_noshell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    3. System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process)
    4. System.Diagnostics.Process.Start ()
    5. (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
    6. GooglePlayServices.CommandLine.Run (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2 envVars, GooglePlayServices.IOHandler ioHandler)
    7. Google.IOSResolver.FindPodTool ()
    8. Google.IOSResolver.RunPodCommand (System.String podArgs, System.String pathToBuiltProject)
    9. Google.IOSResolver.OnPostProcessInstallPods (BuildTarget buildTarget, System.String pathToBuiltProject)
    10. UnityEditor.HostView:OnGUI()
    .
    i also reinstall jdk but it still there
     
  43. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @Dekata

    I've not seen an error like this before. Maybe this Google plugin is trying to call to ruby gems? I would check on the Google documentation or forums for this plugin. I don't believe that this is Unity code running at this point though.
     
  44. cricentifrancesco

    cricentifrancesco

    Joined:
    Sep 12, 2016
    Posts:
    4

    Just had the same issue builiding on iOS with a porting coming from android in unity 5.5.
    Solved with this workflow, thank you ;)
     
  45. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,063
    Hi I'm using Unity 5.6.0f3 and I'm getting a similar error. Build works fine on Android, but copied the entire project and retargeted IOS then got this:

    Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b true -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Assets/link.xml" -x "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Assets/Best HTTP (Pro)/link.xml" -d "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed" -a "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/galentucker/Unity projects/chevronSSAIv3CusMobile_IOS/Temp/StagingArea/Data/Managed/ES2.dll"

    stdout:
    SweepReport:
    Mono.Cecil.TypeDefinition (2029) => UnityEngine.AndroidJavaObject, UnityEngine.AndroidJavaClass, UnityEngine.jvalue, UnityEngine.AndroidJNIHelper, UnityEngine.AndroidJNI, ...
    Mono.Cecil.FieldDefinition (769) => AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback, UnityEngine.Application/LogCallback modreq(System.Runtime.CompilerServices.IsVolatile) s_RegisterLogCallbackDeprecated, System.String unsupportedIdentifier, System.Byte kIsVisibleMask, System.Byte kDistanceMask, ...
    Mono.Cecil.MethodDefinition (11070) => System.Void .ctor(), System.Void add_lowMemory(UnityEngine.Application/LowMemoryCallback), System.Void remove_lowMemory(UnityEngine.Application/LowMemoryCallback), System.Void CancelQuit(), System.Void Unload(), ...
    Fatal error in Mono CIL Linker
    System.ArgumentException: Member 'UnityEngine.AudioClip' is declared in another module and needs to be imported
    at Mono.Cecil.MetadataBuilder.LookupToken (Mono.Cecil.IMetadataTokenProvider provider) [0x00027] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.MakeTypeDefOrRefCodedRID (Mono.Cecil.TypeReference type) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.WriteTypeSignature (Mono.Cecil.TypeReference type) [0x00161] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.WriteMethodSignature (Mono.Cecil.IMethodSignature method) [0x00085] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.GetMethodSignature (Mono.Cecil.IMethodSignature method) [0x00006] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddMethod (Mono.Cecil.MethodDefinition method) [0x0003c] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddMethods (Mono.Cecil.TypeDefinition type) [0x00013] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddType (Mono.Cecil.TypeDefinition type) [0x000a2] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddTypeDefs () [0x00018] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildTypes () [0x00014] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildModule () [0x0007e] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildMetadata () [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter+<>c.<BuildMetadata>b__1_0 (Mono.Cecil.MetadataBuilder builder, Mono.Cecil.MetadataReader _) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TItem item, System.Func`3[T1,T2,TResult] read) [0x00029] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter.BuildMetadata (Mono.Cecil.ModuleDefinition module, Mono.Cecil.MetadataBuilder metadata) [0x0000f] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000b7] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x0004d] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00031] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00019] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.Run (System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x003e2] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00002] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.HostView:OnGUI()


    AND THIS:


    Exception: /Applications/Unity/Unity.app/Contents/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, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:102)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:95)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:126)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:143)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:768)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:586)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:546)
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, 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, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
    UnityEditor.HostView:OnGUI()

    I tried the approach above, and it didn't work.

    Please help!
     
  46. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @galent

    Your issue does look pretty similar to those reported here. There might be a different managed assembly in the project that was not updated for the new Unity API. Can you go throw the project and manually right-click, then select re-import on each assembly? That should ensure they are all updated to the latest Unity API.
     
  47. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,063
    Hi Josh, I"ve re-imported everything, no effect.

    I can build if I set the stripping backend to mono2x and press build, but IL2CPP fails every time.
     
  48. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @galent

    Even though this works with Mono, it might still be a problem later. There is code somewhere trying to call a method that does not exist. The IL2CPP build toolchain detects this earlier, but the probably will exist with Mono if this method is called.

    There might be something different going in this case though. Can you submit a bug report with this project?
     
  49. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,063
    I can look at opening a bug report, but I'm really up against a deadline here.

    What does this message refer to:

    Fatal error in Mono CIL Linker
    System.ArgumentException: Member 'UnityEngine.AudioClip' is declared in another module and needs to be imported
    at Mono.Cecil.MetadataBuilder.LookupToken (Mono.Cecil.IMetadataTokenProvider provider) [0x00027] in <0304696c64424476882bed0a697f98eb>:0

    it looks like AudioClip is being declared in 2 different modules, or am I reading that wrong?
     
  50. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    2,675
    @galent

    That error indicates the type UnityEngine.AudioClip cannot be found. The code in Mono.Cecil is assuming that it exists elsewhere, and needs to be imported, but that does not indicate it actually does exist.

    I believe that something changed recently with the AudioClip API in Unity, so we have seen this error in the past when the Unity API Updater did not run properly.

    As a different workaround, you might be able to use the link.xml file to prevent the managed code stripper from modifying any assemblies in your project. See the documentation here: https://docs.unity3d.com/Manual/iphone-playerSizeOptimization.html

    This error happens during the execution of the managed code stripper, so eliminating it might work around the problem.