Forum Xamarin.iOS

MTOUCH failing with -linkskip in Xamarin 4

ramonesteban78ramonesteban78 ESUniversity ✭✭
edited November 2015 in Xamarin.iOS

Hi all,

I was wondering if anyone has issues with the linker in Xamarin 4.
My project was working fine in Xamarin 3, but since the update the linkskip command it seems that is not working.

This is my configuration of the linker in the Xamarin.iOS project:


And this is the error I'm getting every time I want to archive the release version for distribution:

Error: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
        Parameter name: index
          at System.Collections.CollectionBase.System.Collections.IList.get_Item (Int32 index) <0x17acd10 + 0x0008b> in <filename unknown>:0 
          at Mono.Cecil.AssemblyNameReferenceCollection.get_Item (Int32 index) <0x5bafd8 + 0x0001e> in <filename unknown>:0 
          at Mono.Cecil.ReflectionReader.GetExportedTypeScope (MetadataToken scope) <0x5c5268 + 0x0004f> in <filename unknown>:0 
          at Mono.Cecil.ReflectionReader.VisitExternTypeCollection (Mono.Cecil.ExternTypeCollection externs) <0x5c4e78 + 0x001bf> in <filename unknown>:0 
          at Mono.Cecil.AggressiveReflectionReader.ReadExternTypes () <0x5c4d58 + 0x00027> in <filename unknown>:0 
          at Mono.Cecil.AggressiveReflectionReader.VisitTypeDefinitionCollection (Mono.Cecil.TypeDefinitionCollection types) <0x5b9de0 + 0x00083> in <filename unknown>:0 
          at Mono.Cecil.ReflectionReader.VisitModuleDefinition (Mono.Cecil.ModuleDefinition mod) <0x5b9db8 + 0x0001f> in <filename unknown>:0 
          at Mono.Cecil.StructureReader.TerminateAssemblyDefinition (Mono.Cecil.AssemblyDefinition asm) <0x5b9c18 + 0x00081> in <filename unknown>:0 
          at Mono.Cecil.AssemblyDefinition.Accept (IReflectionStructureVisitor visitor) <0x4f4bb0 + 0x00050> in <filename unknown>:0 
          at Mono.Cecil.AssemblyFactory.GetAssembly (Mono.Cecil.Binary.ImageReader irv, Boolean manifestOnly) <0x4f4430 + 0x000a7> in <filename unknown>:0 
          at Mono.Cecil.AssemblyFactory.GetAssembly (Mono.Cecil.Binary.ImageReader reader) <0x4f4400 + 0x0001b> in <filename unknown>:0 
          at Mono.Cecil.AssemblyFactory.GetAssembly (System.String file) <0x4e9a98 + 0x0001b> in <filename unknown>:0 
          at Mono.CilStripper.Program.Main (System.String[] args) <0x4e7ed8 + 0x00063> in <filename unknown>:0 

MTOUCH: error MT6002: Could not strip assembly `/Users/ramonesteban78/Projects/Bravent/201511/Legalitas/VoluntadLegal.iOS/obj/iPhone/Release/mtouch-cache/64/Build/System.Runtime.dll`.
    Task "MTouch" execution -- FAILED
    Done building target "_CompileToNative" in project "/Users/ramonesteban78/Projects/Bravent/201511/Legalitas/VoluntadLegal.iOS/VoluntadLegal.iOS.csproj".-- FAILED

Done building project "/Users/ramonesteban78/Projects/Bravent/201511/Legalitas/VoluntadLegal.iOS/VoluntadLegal.iOS.csproj".-- FAILED


Thanks in advance



  • MarkJackMilianMarkJackMilian ITUniversity ✭✭

    Same problem here..... sigh.
    Any suggestions?


  • ramonesteban78ramonesteban78 ESUniversity ✭✭

    Hi @MarvinMartian

    I did a rollback of Xamarin Studio until the issue is fixed.

    You can find the information to rollback to a previous version here:


  • ramonesteban78ramonesteban78 ESUniversity ✭✭

    I have registered a bug here:

    Xamarin, why everytime I update to a new version I have the feeling that something is not going to work?

    You have to know that we have clients that expect the best results from us, but if the tool is not good enough, then we have an issue. Not to mention the expensive licences. Can a product so expensive fail in this way?

    Seriously, do something about it.

    Rolling back again...

  • ramonesteban78ramonesteban78 ESUniversity ✭✭

    Any updates on this? At least let us know if you are working on the issue please...

  • ramonesteban78ramonesteban78 ESUniversity ✭✭

    I just found a similar bug alredy resoloved:

    However after installing the last Alpha Release of Xamarin Studio, I'm still getting the same issue.

    This is starting to be frustrating...

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai
    edited April 2017

    Many thanks for filing the bug report. Bug reports are quite helpful to raise the visibility of issues to the Xamarin team. I will now close this thread to consolidate any further discussion and updates onto that bug report: Bug 36577. Feel free to post any further findings about improved or more detailed workarounds on the bug report to make them visible to other users.

    (As always, I'm also happy to reopen the thread upon request within the next month or two. Just send a quick email to [email protected] with a link to this thread. For follow-up after the next couple of months, if the remaining related open bug reports or forum threads do not cover the desired scenario, please follow the recommendations to create a new bug report, forum thread, or Stack Overflow question. Thanks!)

This discussion has been closed.