Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Version 6.2.0 - System.InvalidOperationException: 'Mapper already initialized. You must call Initialize once per application domain/process.' #2405
I'm using AutoMapper with Xamarin Android. It's no longer working in 6.2 and I'm receiving the exception:
I was doing my initialisation in the OnCreate method of my Activity, but if the app is backgrounded and then resumed, the method gets called again and the the exception occurs. I don't know where else I can call it, due to the way Android is architected. I tried experimenting with singletons with no joy.
This worked in versions before 6.1.0
System.InvalidOperationException: 'Mapper already initialized. You must call Initialize once per application domain/process.'
Steps to reproduce