Problem Description
After upgrading to AutoMapper v15.0.1, I encountered the following compile-time error when trying to register AutoMapper manually:
services.AddAutoMapper(typeof(AssemblyReference).Assembly);
Error:
CS1503: Argument 2: cannot convert from 'System.Reflection.Assembly' to 'System.Action<AutoMapper.IMapperConfigurationExpression>'
This code worked perfectly fine in AutoMapper v14.x.
How can I resolve this error in AutoMapper 15?
It seems that a license is required in the new version. https://docs.automapper.io/en/stable/15.0-Upgrade-Guide.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With