Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing overload AddAutoMapper(params Assembly[]) in v15 — broke manual registration [closed]

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?

like image 869
A.SOW Avatar asked Dec 19 '25 15:12

A.SOW


1 Answers

It seems that a license is required in the new version. https://docs.automapper.io/en/stable/15.0-Upgrade-Guide.html

like image 95
lolzor Avatar answered Dec 21 '25 06:12

lolzor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!