13.0 Upgrade Guide

Release notes.

AutoMapper now targets .Net 6

AddAutoMapper is part of the core package and the DI package is discontinued

IMapper has nullable annotations

Besides the build-time impact, there is also a behaviour change. Non-generic Map overloads require now either a destination type or a non-null destination object.

AllowAdditiveTypeMapCreation was removed

Be sure to call CreateMap once for a source type, destination type pair. If you want to reuse configuration, use mapping inheritance.

ProjectTo runtime polymorphic mapping with Include/IncludeBase

We consider this an off the beaten path feature and we don’t expose it through CreateProjection. You can use an extension method or CreateMap.

Context.State similar to Context.Items

The same pattern the framework uses to pass state to delegates. Note that State and Items are mutually exclusive per Map call.

Custom Equals/GetHashCode for source objects

To avoid broken implementations, we no longer call those when checking for identical source objects, we hard code to checking object references.