0

Unity3d 4.6.7p2 iOS il2cpp Universal .NET Stripping Disabled We've got the error when building our iOS build.
The strange thing is that this error appeared at some point of time on all computers in our office, and if we switch to commits in Git that were built without problems, the error exists.
So we think this error are not related to our changes. We tried to switch to older commits, restart Unity, clean Library folder nothing changes. What can cause such error?

Failed running   /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/PATH/Temp/StagingArea/Data/Managed" -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 "/PATH/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/PATH/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/PATH/Assets/link.xml" -d "/PATH/Temp/StagingArea/Data/Managed" -a  "/PATH/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/IFacebook.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/Glow11.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/HOTweenMicro.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/ArabicSupport.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/DecalSystem.Runtime.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/P31RestKit.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/P31WinPhoneFlurry.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/P31WinPhoneSocialNetworking.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/P31WinPhoneStore.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/Photon3Unity3D.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/OUR_COMPANY.Phone.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/TPL.dll" -a  "/PATH/Temp/StagingArea/Data/Managed/websocket-sharp.dll"

stdout;
Fatal error in Mono CIL Linker
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
  at Mono.Linker.LinkContext.Resolve (IMetadataScope scope) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.ResolveFromXmlStep.ProcessReferences (Mono.Cecil.AssemblyDefinition assembly, Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, System.String assemblyName) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.BaseStep.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)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String)
UnityEditorInternal.IL2CPPBuilder:StripAssemblies(IEnumerable`1, String)
UnityEditorInternal.IL2CPPBuilder:Run()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
UnityEditor.HostView:OnGUI()

link.xml:

<linker>
<assembly fullname="mscorlib">
    <namespace fullname="System.Security.Cryptography" preseve="all"/>
</assembly>

Petr
  • 836
  • 1
  • 14
  • 37
  • From what I can make of it, there is a problem with your link.xml. Post that please. – Puneet Aug 26 '15 at 17:35
  • @Puneet posted it. link.xml is never changed, from initial commit (I checked in Git). But as I described, commits that we can build before, now are not building. – Petr Aug 27 '15 at 07:11
  • 1
    This error means that something is referencing the System.Threading assembly, but that assembly is not found in your project. I'm not sure about the cause, but these questions might help: 1. Do you expect something to be references System.Threading? (maybe a plugin) 2. Does System.Threading.dll exist in your project or the .NET profile you are using (The "Api Level Compatibility" setting in Unity) – Josh Peterson Aug 27 '15 at 10:34
  • @Petr try adding to your link.xml. – Puneet Aug 27 '15 at 11:16

1 Answers1

0

My colleague solved this by replacing functional from TPL.dll with Parse library, and by removing TPL.dll from project.

Petr
  • 836
  • 1
  • 14
  • 37