I get this error when I'm building my application for iOS. Scripting backend is set to IL2CPP and architecture is universal. I know that a plugin in my project uses the zxing library, which is causing this error. I don't get any errors when I'm building for android but can't get the ios build. Is there any other way to build except removing the plugin?
Failed running C:\Program Files\Unity\Editor\Data\Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed" -l none -c link -x "C:\Program Files\Unity\Editor\Data\Tools\native_link.xml" -f "C:\Program Files\Unity\Editor\Data\il2cpp\LinkerDescriptors" -x "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed..\platform_native_link.xml" -x "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -d "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\Assembly-CSharp-firstpass.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\Assembly-UnityScript.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\UnityEngine.UI.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\cscanner.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\Google.ProtocolBuffers.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\Google.ProtocolBuffers.Serialization.dll" -a "C:\Users\Koray\Source\Repos\NewJoyiOS\NewJoyiOS\Temp\StagingArea\Data\Managed\NativeToolkitWP8.dll"
stdout: Fatal error in Mono CIL Linker Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'zxing.unity, Version=0.12.0.0, Culture=neutral, PublicKeyToken=null' at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.ProcessReferences (Mono.Cecil.AssemblyDefinition assembly, Mono.Linker.LinkContext context) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in :0 at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in :0 at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in :0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in :0 at Mono.Linker.Driver.Run () [0x00000] in :0 at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in :0 stderr:
UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:66) UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable
1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:192) UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable
1) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:185) UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable1) (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:477) UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:465) UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:293) UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:211) UnityEditor.HostView:OnGUI()
Is there a zxing.unity.dll file in the project? It looks like that assembly is missing. I suspect there is a link.xml file in the project which references that assembly. If you remove that link.xml file, things might work.
Note that this probably work with Android/Mono because managed code stripping is not enabled by default, and the link.xml files in the project are therefore ignored.
For reference, there are more details about the link.xml file with Unity here.