AutoMapper 9.0 Released

As with the other major releases of AutoMapper, this one introduces breaking API changes with relatively few other additions. The major breaking changes (see upgrade guide for details) include:

  • Removing the static API
  • Removing "dynamic" maps (automatically created maps)
  • Fix on IMappingAction to include a ResolutionContext parameter

The motivation behind removing the static API is that most new users to AutoMapper will do so through the DI extensions packages, using services.AddAutoMapper(typeof(Startup)). If you want a static usage of AutoMapper, you can still do so, but you're in charge of creating a static holder and referencing that.

The bigger, more unpopular change, is removing dynamic maps. Dynamic maps have a long history in AutoMapper, and it was actually removed once before added back in. I've never used them, will never use them, and they go against the underlying design philosophy of the project. I don't want to support features I don't use or recommend, so this is getting the axe.

Let this be a lesson to other OSS authors - never add features to your library you'd recommend avoiding, no matter how much a feature is "wanted".

I've also released the latest version of the DI package, and will roll out updates to other ancillary packages shortly.

Enjoy! Or not ;)