Problem with "Link SDKs only" and iOS

DirkWilhelmDirkWilhelm USMember ✭✭✭✭


i'm developing an forms app that uses AutoMapper. In debug mode using then "none" linker behavior, the app starts fine on an iOS device.

But when i set the linker behavior to "Link Framework SDKs only" to reduce the ipa file size, my app crashes on startup on an ios device.

In the XCode device console i get this error message:

MessageSystem.ArgumentNullException: Value cannot be null.Xamarin Exception Stack:
Parameter name: method
  at System.Linq.Expressions.Expression.Call (System.Reflection.MethodInfo method, System.Linq.Expressions.Expression arg0) <0x58a094 + 0x00168> in <773264786149499a986a13db6a7d46fe#ce1cb84126f73a531493ca9b7808688d>:0 
  at AutoMapper.Mappers.ConvertMapper.ConvertExpression (System.Type sourceType, System.Type destinationType) <0x169ce54 + 0x000ef> in <0cc4ddabcc77416ea712cf2d35abef51#ce1cb84126f73a531493ca9b7808688d>:0 
  at AutoMapper.Mappers.ConvertMapper+<>c__DisplayClass1_1.<GetConverters>b__4 () <0x169d440 + 0x00023> in <0cc4ddabcc77416ea712cf2d35abef51#ce1cb84126f73a531493ca9b7808688d>:0 
  at System.Lazy`1[T].CreateValue () <0x80eec + 0x0023c> in <a89624c267f94034b6cf9aa0c56f8864#ce1cb84126f73a531493ca9b7808688d>:0 
  at System.Lazy`1[T].LazyInitValue () <0x80b34 + 0x00043> in <a89624c267f94034b6cf9aa0c56f8864#ce1cb84126f73a531493ca9b7808688d>:0 
  at System.Lazy`1[T].get_Value () <0x80a8

I tried to exclude automapper and system.core from the linker as described in the xamarin documentation, but that doesn't seem to work, i still get that error message.

I'm using the latest stable xamarin release.

Besides from not using the linker, what can i do to resolve my problem?

Sign In or Register to comment.