docs/source/15.0-Upgrade-Guide.md
You can set your license via the configuration:
services.AddAutoMapper(cfg => {
cfg.LicenseKey = "<License Key Here>";
});
You can register for your license at https://automapper.io.
AddAutoMapperWith the requirement to supply a license, the AddAutoMapper overloads all require the Action<IMapperConfigurationExpression> parameter:
// Previous
services.AddAutoMapper(typeof(Program));
// Current
services.AddAutoMapper(cfg => cfg.LicenseKey = "<License Key Here>", typeof(Program));
This method parameter is first for all AddAutoMapper overloads.
MapperConfigurationThe constructor to MapperConfiguration now requires an ILoggerFactory:
public MapperConfiguration(
MapperConfigurationExpression configurationExpression,
ILoggerFactory loggerFactory)
This parameter is used for diagnostics.