Can't build to ios , Fatal error in Mono CIL Linker and Problem with UnusedBytecodeStripper2.exe!

Hi

in my game this message appear when i produce to iphone !!

are the some solution for this problem ??

i run patch 5.2.1 p3 , and problem still appear !!

i change Api level in player setting to .NET 2 , but also not work !!

i have this plugins in my game :

playmaker - MadlLevelManager - ORKframework - DoTween pro

i see different error Msg appear in log :

Error building Player: Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!

also this :

Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\tempStrip" -l none -c link -x "C:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\..\platform_native_link.xml" -x "C:\Users\me\Documents\‏‏chickenbox/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-UnityScript-firstpass.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\DOTween.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\DOTweenPro.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\ORKFramework.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\ORKFrameworkCore.dll" -a  "C:\Users\me\Documents\‏‏chickenbox\Temp\StagingArea\Data\Managed\PlayMaker.dll"

stdout:
Fatal error in Mono CIL Linker

System.Exception: Error processing method: 'System.Void DG.Tweening.DOTweenPath::smile:OComplete()' in assembly: 'DOTweenPro.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void DG.Tweening.TweenExtensions::Complete(DG.Tweening.Tween)
  at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
  at Mono.Linker.Steps.MarkStep.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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:444)
UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable`1, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417)
UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:291)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
UnityEditor.HostView:OnGUI()

also this :

Exception: C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:68)
UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192)
UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185)
UnityEditorInternal.AssemblyStripper.Strip (System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:136)
UnityEditorInternal.AssemblyStripper.Strip (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String monoLinkerPath, System.String descriptorsFolder, IEnumerable`1 additionalBlacklist) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:121)
UnityEditorInternal.IL2CPPBuilder.RunAssemblyStripper (IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:444)
UnityEditorInternal.IL2CPPBuilder.StripAssemblies (IEnumerable`1 assemblies, System.String managedAssemblyFolderPath) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:417)
UnityEditorInternal.IL2CPPBuilder.Run () (at C:/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 C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211)
UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.iOSBuildPostprocessor pp, BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String stagingAreaDataManaged, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)
UnityEditor.HostView:OnGUI()

I have Unity 5.2.1 P3

and all this msg appear after doing this events :

  • importing old standerd asset (charachtar control )
  • import New DoTween ver
  • and some tiny change in code !!

Please help :frowning:

@Nooh_1

It may be worth looking at the DOTweenPro.dll assembly in a tool like ILSpy. This error means that the DoComplete method in the DG.Tweening.DOTweenPath type uses a method named Complete in the DG.Tweening.TweenExtensions type. Maybe this TweenExtensions type is in a different assembly that you don’t have in your project?

You may also want to ask the DOTween maintainers about this error. Have other users seen it?

Bump. I am also getting a similar error but for DOTween.Restart

Never heard about this problem before (Nooh never contacted me, so maybe he solved it?). Can you post your full error log @ ? Did you check already that you’re not missing any files?

@Demigiant , sure here’s the first error:

This is the second error:

This happens only when I build for iOS. Android and Stand Alone are OK.

EDIT: Note that it says Unity 5.1.4 but this is a typo; I’m actually on Unity 5.4.1

I think I found the problem. It seems that Unity’s iOS builder has troubles accepting a method with optional parameters. This definitely looks like a Unity bug, hope someone can look into it. In the meantime, I’m gonna send you via email a modified version that should fix this, in a short while.

Actually, no, wait. I realized that fixing this on my side would be way more complex than I thought, and lead to verbose code that will should be unnecessary since I’m pretty sure Unity fixed this already. Could you try upgrading your project to Unity 5.6 (or the latest release version possible, at least 5.4.5) and try again?

Is there no way for you to fix it? If it’s only a method that has optional parameters can’t you do something like this?

So this:

void DoStuff(int x = 0, float y = 9, string g = "hi");

Could become this:

void DoStuff(int x, float y, string g){
   //Actually do stuff
}

void DoStuff(int x, float y){
    DoStuff(x, y, "hi);
}

void DoStuff(int x){
    DoStuff(x, 9);
}

void DoStuff(){
    DoStuff(0);
}

I’d really hate to have to upgrade Unity right now as I’m very very close to finishing a project. :frowning: