I am having some trouble getting AutoMapper (3.2.1.0) to work on a iPad during debug using Xamarin. I have setup the mac to work as a build host using Xamarin studio 3 and Xamarin.iOS 7.2.3.39. On my Windows system I use Visual Studio 2012.
In my solution I have two projects:
- PortableClassLibrary
- MySampleApplication
In the PortableClassLibrary project I have the following code:
Mapper.CreateMap<MyEntity, MyModel>()
.ForMember(ev => ev.Name, m => m.MapFrom(a => a.MyName));
When run the debugger I get the following exception:
“Unhandled Exception:
System.ExecutionEngineException: Attempting to JIT compile method
'AutoMapper.Internal.DictionaryFactory:CreateDictionary<AutoMapper.Impl.TypePair,
AutoMapper.TypeMap> ()' while running with --aot-only. See
http://docs.xamarin.com/ios/about/limitations for more information.”
I did try to use
..\packages\AutoMapper.3.2.1\lib\portable-windows8+net40+wp8+wpa81+sl5+MonoAndroid+MonoTouch\AutoMapper.dll
And
..\packages\AutoMapper.3.2.1\lib\portable-windows8+net40+wp8+sl5+MonoAndroid+MonoTouch \AutoMapper.dll
But this makes no difference regarding the exception.
I look like that Automapper is trying to create a dictionary using value types, but is is one of the limitations described in the given url.
Is there something I am missing to get this working?
Cheers,
André