--linkskip mtouch argument with multiple assemblies

jessejesse USMember

I couldn't find this documented anywhere and it took me a while to figure out so I'm posting here in case anyone finds it useful.

When using Link All Assemblies if you want to tell the linker to skip entire assemblies, you can do it by putting this in the "Additional mtouch arguments" of your top-level assembly
--linkskip=NameOfAssemblyToSkipWithoutFileExtension

If you want the linker to skip multiple assemblies, you include multiple linkskip arguments:
--linkskip=NameOfFirstAssembly --linkSkip=NameOfSecondAssembly

If you try to use a list of assemblies (for example, --linkskip=FirstAssembly;SecondAssembly), the linker will silently fail to skip anything. I swear that this worked in an older version of Xamarin.iOS, but it doesn't work today (Xamarin.iOS 7.2.6).

Posts

  • jameszhoujameszhou CNMember ✭✭

    Thanks @JesseAttas‌

    Can anyone confirm this or Xamarin please update the doc to make it more clear

  • KMullinsKMullins USMember, Xamarin Team Xamurai

    All,

    I've filed a bug report to get this information added to our documentation.

    Thanks,

    Kevin

  • Felix.xFelix.x USMember ✭✭

    I just tested in Xamarin Studio 6.1.2, this issue still exists. only --linkskip=NameOfFirstAssembly --linkSkip=NameOfSecondAssembly works.

    So maybe this is a feature not a bug.

  • Abhijeet_SuryaAbhijeet_Surya USMember ✭✭✭

    This is old post, but someone will get help

    If wanted to skip multiple assemblies in link all behaviour.

    --linkskip=Microsoft.Practices.Unity --linkskip=Prism.Unity

  • kwackmasterkwackmaster USMember ✭✭

    This had me pulling my hair out on our Android build.
    If you use the project properties to add the assemblies, make sure you omit the '--' prefix and just list the assemblies without the extension.
    The tooltip now shows this but it had me frustrated for a minute. Hopefully this clarifies it for someone else too.

Sign In or Register to comment.