Moving from AutoMapper 14¶
ForkForward.Mapper is AutoMapper 14.0.0 under a new name. The types, their members and the behaviour are the same; what changes is where they live.
Two steps¶
- Package. Remove the
AutoMapperpackage reference and addForkForward.Mapper:
If the project also references AutoMapper.Extensions.Microsoft.DependencyInjection, remove it too: AddAutoMapper is part of ForkForward.Mapper.
- Namespaces. Replace
AutoMapperwithForkForward.Mapperinusingdirectives, including the sub-namespaces:
| Before | After |
|---|---|
using AutoMapper; |
using ForkForward.Mapper; |
using AutoMapper.QueryableExtensions; |
using ForkForward.Mapper.QueryableExtensions; |
using AutoMapper.Configuration.Annotations; |
using ForkForward.Mapper.Configuration.Annotations; |
using AutoMapper.Internal; |
using ForkForward.Mapper.Internal; |
A global using (<Using Include="ForkForward.Mapper" /> in the project file) does it once for a whole project. For a solution, a search and replace of using AutoMapper with using ForkForward.Mapper is safe: no other identifier starts that way.
That is all. The code compiles and behaves as it did with AutoMapper 14.0.0.
What stays as it was¶
- Type names.
IMapper,MapperConfiguration,Profile,AutoMapperMappingException,AutoMapperConfigurationException,AutoMapAttribute,AddAutoMapperand every other type and member keep their names, including the ones that carry the old project's name. - Behaviour. Conventions, configuration, validation, projection: unchanged. The only difference in behaviour is a security fix: a source graph nested deeper than the thread's stack allows now ends in an
AutoMapperMappingExceptioninstead of a process crash (CVE-2026-32933). - Documentation. These pages are AutoMapper's, with the namespace updated.
What else changes¶
- Assembly identity. The assembly is
ForkForward.Mapper.dll, signed with the fork's own key (public key tokend1f0d2ab1c32618c). A library compiled againstAutoMapper.dlldoes not load against this assembly; it has to be recompiled againstForkForward.Mapper. Assembly binding redirects cannot bridge the two, as the names differ. - Both packages at once.
AutoMapperandForkForward.Mappercan be referenced in the same project without a conflict, since nothing overlaps, but a type from one is not the type from the other: anIMapperregistered byAutoMapperdoes not satisfy a constructor that asks forForkForward.Mapper.IMapper. Move a project as a whole. - Version numbers continue from 14:
ForkForward.Mapper 14.1.0is the first stable release. The previews14.1.0-preview.2and14.1.0-preview.3still used theAutoMappernames.
Moving from AutoMapper 15 or later¶
AutoMapper 15 and later are under a different licence and were never part of this fork; their new features are not here. Code written for 14 that was later moved to 15 may use API that 14 does not have; the AutoMapper upgrade guides list what 15 added. Everything described on these pages is available.