ios build error

unity version : 5.5.0p2

Android in-app payments work well.
However, when I build the iOS platform after changing it, the following error occurs.

Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0 -out “/Users/HyunzLife/private/LottoDay/LottoDay/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 “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/…/platform_native_link.xml” -x “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml” -x “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/preserved_derived_types.xml” -x “/Users/HyunzLife/private/LottoDay/LottoDay/Assets/link.xml” -d “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed” -a “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll” -a “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll” -a “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll” -a “/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll”

stdout:
SweepReport:
Mono.Cecil.MethodDefinition => UnityEngine.Purchasing.AndroidStore get_androidStore()System.Void OnSetupFailed(System.String)System.Void OnProductsRetrieved(System.String)System.Void OnPurchaseSucceeded(System.String,System.String,System.String)System.Void OnPurchaseFailed(System.String)
System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
Mono.Cecil.FieldDefinition => System.Boolean m_FailRefreshSystem.String NameSystem.Boolean restoreCalledSystem.String screenshotPathSystem.String pricingTemplateID
Fatal error in Mono CIL Linker
Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture
at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x1042e15d0 + 0x002fd> in :0
at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x1013bce70 + 0x0006b> in :0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x1013e6080 + 0x000e6> in :0
at Mono.Linker.Driver.Run (IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x101299430 + 0x00be7> in :0
at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x1012993e0 + 0x00026> in :0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x1012992f0 + 0x0003b> in :0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, 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, IEnumerable1, 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:123) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
UnityEditor.HostView:OnGUI()

This looks like it might be a bug on the Unity side. Can you submit a bug report with this project? The key error message is:

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

Certainly the RenderTexture type should exist in the UnityEngine.dll assembly. So something is very wrong, although I’m not sure what it is.

Thank you for your reply.
I posted it on the Unity bug report.

Can you let me know the bug report number? I’ll make sure that it is routed to the proper team then.

It looks like we have found the bug report now, thanks!

I just upgraded my project from Unity 5.4.2 to 5.5 and upgrade the AWS SDK plugin and am now getting this same error:

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

Any way to work around?

just tried the latest patch release 5.5.0.p3 which doesn’t seem to help. Here’s the full error:

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

stdout:
SweepReport:
Mono.Cecil.MethodDefinition => System.Collections.Generic.Dictionary2<System.String,System.String> get_CloneLogins()System.Void Clear()System.String[ ] get_CurrentLoginProviders()System.Boolean ContainsProvider(System.String)System.Void RemoveLogin(System.String) System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition Mono.Cecil.FieldDefinition => System.Collections.Generic.List1<System.Object> annotationsSystem.EventHandler1<System.Xml.Linq.XObjectChangeEventArgs> ChangingSystem.EventHandler1<System.Xml.Linq.XObjectChangeEventArgs> ChangedSystem.String XmlnsNamespaceSystem.String DataArrayKey
Fatal error in Mono CIL Linker
Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture
at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x10e5ef620 + 0x002fd> in :0
at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x10d1422b0 + 0x0006b> in :0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x10d141370 + 0x000e6> in :0
at Mono.Linker.Driver.Run (IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x10a1ac520 + 0x00be7> in :0
at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x10a1ac4d0 + 0x00026> in :0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer1 typeComparer, IEqualityComparer1 methodComparer) <0x10a1ac3e0 + 0x0003b> in :0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, 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, IEnumerable1, 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:123) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
UnityEditor.HostView:OnGUI()

I’m set to IL2CPP, .NET 2.0 Subset. Strip Engine Code check or unchecked doesn’t seem to matter.

Why is it referencing the Mono linker if I’m set to IL2CPP? Is that expected?

And why is it trying to strip byte code if I have that option disabled?

@johnryork

This bug has not yet been corrected. If possible, can you submit a bug report as well? Although the error looks the same, this might be slightly different than the issue reported by @UDN_19fe4864-257d-4d79-8d81-a15260fd4f73 , so a separate bug report may help us track down the cause.

Yes, the Mono linker is a general utility used to remove unused IL byte code from assemblies. Although its name can be misleading, it is independent of the script backend used.

The IL2CPP scripting backend always strips unused byte code. The “Strip Engine Code” option only determine whether or not unused native code in the Unity engine should be removed. That option does not have an impact on the stripping of managed byte code.

We have tracked down the cause of the issue reported by @UDN_19fe4864-257d-4d79-8d81-a15260fd4f73 . It is a bug in the UnusedBytecodeStripper2, and we should have a fix in the 5.5.1p1 patch release if all goes well.

It might be possible to work around the issue though. Some assembly in the project uses the UnityEngine.RenderTexture::generateMips property, which was renamed to autoGenerateMips in Unity 5.5. The API Updater will correctly make this change to the assembly, but in the bug report, the API Updater did not run on this assembly for an unknown reason. The assembly in this case was Vuforia.UnityExtensions.dll, but any assembly could be impacted.

So, it is possible to work around this issue by ensuring that the API Updater has been run on all assemblies in the project. You can use ILSpy or ildasm to check the content of an assembly. Make sure an assembly does not reference UnityEngine.RenderTexture::generateMips after the API Updater modified it.

I’m also experiencing similar error messages. Tried all scripting options Mono2x, IL2CPP, .NET 2.0, .NET 2.0 Subset, different Stripping Levels but none worked for iOS build on Unity 5.5.0f3. My project builds fine on Unity 5.4.3

@kopanz

I don’t think any of those options will impact this issue. You’ll need to wait for 5.5.1p1 to be released or have a look in the assemblies in your project as I mentioned above. Hopefully we should have this release with the fix available soon though.

1 Like

@JoshPeterson I have those errors in v5.6.b11 version when I compile in iOS platform. How can I fix it? Thanks in advance.

Failed running /Applications/Unity56b11/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/tempStrip” -l none -c link -b true -x “/Applications/Unity56b11/PlaybackEngines/iOSSupport/Whitelists/Core.xml” -f “/Applications/Unity56b11/Unity.app/Contents/il2cpp/LinkerDescriptors” -x “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/…/platform_native_link.xml” -x “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml” -x “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/preserved_derived_types.xml” -x “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Assets/link.xml” -x “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Assets/GameSparks/link.xml” -d “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed” -a “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll” -a “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll” -a “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll” -a “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll” -a “/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/ES2.dll”

stdout:
SweepReport:
Mono.Cecil.MethodDefinition (12520) => System.Void .ctor(System.String,System.Object[ ]), System.Void Call(System.String,System.Object[ ]), FieldType Get(System.String), System.Void Set(System.String,FieldType), FieldType GetStatic(System.String), …
Mono.Cecil.TypeDefinition (2758) => UnityEngine.WeakListenerBindings, UnityEngine.UserAuthorization, UnityEngine.ApplicationInstallMode, UnityEngine.ApplicationSandboxType, UnityEngine.AssetBundleManifest, …
Mono.Cecil.FieldDefinition (1505) => AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback, UnityEngine.Application/LogCallback modreq(System.Runtime.CompilerServices.IsVolatile) s_RegisterLogCallbackDeprecated, System.String unsupportedIdentifier, System.Byte kIsVisibleMask, System.Byte kDistanceMask, …
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.b__1_0 (Mono.Cecil.MetadataBuilder builder, Mono.Cecil.MetadataReader _) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TItem item, System.Func3[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.IEqualityComparer1[T] typeComparer, System.Collections.Generic.IEqualityComparer1[T] methodComparer) [0x003e2] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0 at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer1[T] typeComparer, System.Collections.Generic.IEqualityComparer1[T] methodComparer) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0 at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer1[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, Action1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable1, 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, IEnumerable1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97) UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[ ], String[ ], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:203) UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (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:144) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
UnityEditor.HostView:OnGUI()

And…

Exception: /Applications/Unity56b11/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.Action1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98) UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable1 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, IEnumerable1 additionalBlacklist) (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) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:203) UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (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:144) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action1 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:740)
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:557)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:521)
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()

@angelsm85

It looks like this might be a slightly different issue. I’ve not seen this before that I can recall. You could try to reimport any managed assemblies in the project to ensure that they have been updated via the API Updater. If that does not work, I would recommend submitting a bug report on this issue.

Does the same project work with Unity 5.5? It might be a new problem in 5.6.

Yes, in v5.5 all was fine

@angelsm85

Please submit a bug report with this project if possible. This is definitely something we want to correct soon.

The errors happen with this settings:

Scripting Backend: IL2CPP
Api Compatibility Level: .Net 2.0 Subset
Strip Engine Code: ON

When I change to Mono2x on Scripting Backend and Strip Byte Code on Strippping Level , it doesn’t appear errors.

@angelsm85

That makes sense, as the Mono scripting backend uses a different managed code stripping utility than IL2CPP.

Do I submit a bug report? My game is a big archive to send it…

@angelsm85

Yes, please submit a bug report. If the game is too big to attach, just mentioned that in the bug report, and we will communicate with you via the bug report about a different way to get the project. Also, please let me know the bug report number when you get it, so that I track it down properly.