AutoMapper 16.2.0

AutoMapper

CI NuGet Documentation Status

What is AutoMapper?

AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?

This is the main repository for AutoMapper, but there's more:

How do I get started?

First, configure AutoMapper to know what types you want to map, in the startup of your application:

var configuration = new MapperConfiguration(cfg => 
{
    cfg.CreateMap<Foo, FooDto>();
    cfg.CreateMap<Bar, BarDto>();
}, loggerFactory);

// or more typically, using IServiceCollection with automatic service registration
services.AddAutoMapper(cfg => 
{
    cfg.CreateMap<Foo, FooDto>();
    cfg.CreateMap<Bar, BarDto>();
});
// AutoMapper will automatically register any implementations of:
// - IValueResolver<TSource, TDestination, TDestMember>
// - IMemberValueResolver<TSource, TDestination, TSourceMember, TDestMember>
// - ITypeConverter<TSource, TDestination>
// - IValueConverter<TSourceMember, TDestinationMember>
// - ICondition<TSource, TDestination, TDestMember>
// - IPreCondition<TSource, TDestination>
// - IMappingAction<TSource, TDestination>
// from the provided assemblies

// only during development, validate your mappings; remove it before release
#if DEBUG
configuration.AssertConfigurationIsValid();
#endif
// use DI (http://docs.automapper.io/en/latest/Dependency-injection.html) or create the mapper yourself
var mapper = configuration.CreateMapper();

Then in your application code, execute the mappings:

var fooDto = mapper.Map<FooDto>(foo);
var barDto = mapper.Map<BarDto>(bar);

Check out the getting started guide. When you're done there, the wiki goes in to the nitty-gritty details. If you have questions, you can post them to Stack Overflow.

Where can I get it?

First, install NuGet. Then, install AutoMapper from the package manager console:

PM> Install-Package AutoMapper

Or from the .NET CLI as:

dotnet add package AutoMapper

Do you have an issue?

You might want to know exactly what your mapping does at runtime.

If you're still running into problems, file an issue above.

If you are a paying customer, you can contact support via your account.

How do I set the license key?

You can set the license key when registering AutoMapper:

services.AddAutoMapper(cfg => 
{
    cfg.LicenseKey = "<license key here>";
})

You can register for your license key at AutoMapper.io

Showing the top 20 packages that depend on AutoMapper.

Packages Downloads
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
56
KubernetesClient.Models
Client library for the Kubernetes open source container orchestrator.
55
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
55
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
54
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
53
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
52
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
51
KubernetesClient.Models
Client library for the Kubernetes open source container orchestrator.
51
KubernetesClient
Client library for the Kubernetes open source container orchestrator.
50

Version Downloads Last updated
16.2.0 36 7/3/2026
16.1.1 42 3/14/2026
16.1.0 41 3/11/2026
16.0.0 46 12/11/2025
16.0.0-beta-1 44 12/12/2025
15.1.3 37 3/20/2026
15.1.2 38 3/17/2026
15.1.1 30 3/17/2026
15.1.0 46 12/11/2025
15.0.1 48 12/11/2025
15.0.0 40 1/4/2026
14.0.0 44 12/11/2025
13.0.1 37 12/11/2025
13.0.0 35 1/4/2026
12.0.1 48 12/11/2025
12.0.0 48 12/11/2025
11.0.1 39 12/11/2025
11.0.0 33 12/11/2025
10.1.1 41 12/11/2025
10.1.0 45 1/4/2026
10.0.0 49 12/11/2025
9.0.0 41 12/12/2025
8.1.1 48 12/12/2025
8.1.0 55 12/12/2025
8.0.0 51 12/12/2025
7.0.1 46 12/12/2025
7.0.0 45 1/4/2026
7.0.0-alpha-0001 44 12/12/2025
6.2.2 55 12/12/2025
6.2.1 49 12/12/2025
6.2.0 45 12/12/2025
6.1.1 44 12/12/2025
6.1.0 42 12/12/2025
6.0.2 41 12/12/2025
6.0.1 45 1/4/2026
6.0.0 40 1/4/2026
5.2.0 44 12/12/2025
5.1.1 45 12/12/2025
5.1.0 43 1/4/2026
5.0.2 46 12/12/2025
5.0.1 43 1/4/2026
5.0.0 41 1/4/2026
5.0.0-beta-1 52 12/12/2025
4.2.1 47 12/12/2025
4.2.0 44 12/11/2025
4.1.1 46 12/12/2025
4.1.0 43 1/4/2026
4.0.4 55 12/12/2025
4.0.3 46 1/4/2026
4.0.2 45 1/4/2026
4.0.1 41 1/4/2026
4.0.0 46 1/4/2026
4.0.0-ci1061 44 1/4/2026
4.0.0-ci1057 50 1/4/2026
4.0.0-ci1056 46 1/4/2026
4.0.0-ci1054 51 1/4/2026
4.0.0-ci1053 44 1/4/2026
4.0.0-ci1052 49 1/4/2026
4.0.0-ci1051 42 1/4/2026
4.0.0-ci1050 36 1/4/2026
4.0.0-ci1049 47 1/4/2026
4.0.0-ci1046 49 1/4/2026
4.0.0-ci1038 49 1/4/2026
4.0.0-ci1036 48 1/4/2026
4.0.0-ci1034 46 1/4/2026
4.0.0-ci1032 49 1/4/2026
4.0.0-ci1031 47 1/4/2026
4.0.0-ci1026 48 1/4/2026
4.0.0-ci1021 48 1/4/2026
4.0.0-ci1020 46 1/4/2026
4.0.0-ci1019 38 1/4/2026
4.0.0-ci1018 41 1/4/2026
4.0.0-ci1017 51 1/4/2026
4.0.0-ci1015 45 1/4/2026
4.0.0-ci1014 41 1/4/2026
4.0.0-ci1007 41 1/4/2026
4.0.0-ci1006 45 1/4/2026
4.0.0-ci1004 42 1/4/2026
4.0.0-ci1002 54 1/4/2026
4.0.0-alpha1 41 12/11/2025
3.3.1 45 12/11/2025
3.3.0 58 12/12/2025
3.3.0-ci1033 46 1/4/2026
3.3.0-ci1032 47 1/4/2026
3.3.0-ci1031 48 1/4/2026
3.3.0-ci1030 39 1/4/2026
3.3.0-ci1029 44 1/4/2026
3.3.0-ci1028 45 1/4/2026
3.3.0-ci1027 38 1/4/2026
3.3.0-ci1026 46 1/4/2026
3.3.0-ci1025 42 1/4/2026
3.3.0-ci1024 49 1/4/2026
3.3.0-ci1023 37 1/4/2026
3.3.0-ci1022 43 1/4/2026
3.3.0-ci1021 44 1/4/2026
3.3.0-ci1020 40 1/4/2026
3.3.0-ci1019 46 1/4/2026
3.3.0-ci1018 36 1/4/2026
3.3.0-ci1017 46 1/4/2026
3.3.0-ci1016 47 1/4/2026
3.3.0-ci1009 51 1/4/2026
3.3.0-ci1008 44 1/4/2026
3.3.0-ci1007 41 1/4/2026
3.3.0-ci1006 42 1/4/2026
3.3.0-ci1005 46 1/4/2026
3.3.0-ci1004 48 1/4/2026
3.3.0-ci1003 40 1/4/2026
3.3.0-ci1002 56 1/4/2026
3.3.0-ci1001 42 1/4/2026
3.3.0-ci1000 46 1/4/2026
3.2.1 45 12/12/2025
3.2.1-ci1002 48 1/4/2026
3.2.1-ci1001 42 1/4/2026
3.2.1-ci1000 34 1/4/2026
3.2.0 38 1/4/2026
3.2.0-ci1043 40 1/4/2026
3.2.0-ci1042 40 1/4/2026
3.2.0-ci1041 39 1/4/2026
3.2.0-ci1040 40 1/4/2026
3.2.0-ci1039 43 1/4/2026
3.2.0-ci1038 45 1/4/2026
3.2.0-ci1037 43 1/4/2026
3.2.0-ci1036 40 1/4/2026
3.2.0-ci1035 44 1/4/2026
3.2.0-ci1034 38 1/4/2026
3.2.0-ci1033 45 1/4/2026
3.2.0-ci1030 41 1/4/2026
3.2.0-ci1029 43 1/4/2026
3.2.0-ci1028 40 1/4/2026
3.2.0-ci1027 46 1/4/2026
3.2.0-ci1026 38 1/4/2026
3.2.0-ci1025 44 1/4/2026
3.2.0-ci1024 43 1/4/2026
3.2.0-ci1023 43 1/4/2026
3.2.0-ci1022 38 1/4/2026
3.2.0-ci1021 42 1/4/2026
3.2.0-ci1017 41 1/4/2026
3.2.0-ci1016 41 1/4/2026
3.2.0-ci1015 44 1/4/2026
3.2.0-ci1014 39 1/4/2026
3.2.0-ci1011 41 1/4/2026
3.2.0-ci1010 38 1/4/2026
3.2.0-ci1009 50 1/4/2026
3.2.0-ci1008 38 1/4/2026
3.2.0-ci1005 48 1/4/2026
3.2.0-ci1004 52 1/4/2026
3.2.0-ci1003 42 1/4/2026
3.2.0-ci1002 38 1/4/2026
3.2.0-ci1001 38 1/4/2026
3.2.0-ci1000 38 1/4/2026
3.1.1 43 12/12/2025
3.1.1-ci1003 41 1/4/2026
3.1.1-ci1000 42 1/4/2026
3.1.0 48 12/12/2025
3.1.0-ci1058 42 1/4/2026
3.1.0-ci1056 53 1/4/2026
3.1.0-ci1053 48 1/4/2026
3.1.0-ci1051 43 1/4/2026
3.1.0-ci1050 42 1/4/2026
3.1.0-ci1049 45 1/4/2026
3.1.0-ci1048 44 1/4/2026
3.1.0-ci1047 40 1/4/2026
3.1.0-ci1046 52 1/4/2026
3.1.0-ci1045 41 1/4/2026
3.1.0-ci1044 44 1/4/2026
3.1.0-ci1043 43 1/4/2026
3.1.0-ci1038 42 1/4/2026
3.1.0-ci1037 46 1/4/2026
3.1.0-ci1036 44 1/4/2026
3.1.0-ci1035 47 1/4/2026
3.1.0-ci1034 44 1/4/2026
3.1.0-ci1033 47 1/4/2026
3.1.0-ci1032 40 1/4/2026
3.1.0-ci1027 43 1/4/2026
3.1.0-ci1026 53 1/4/2026
3.1.0-ci1024 55 1/4/2026
3.1.0-ci1023 46 1/4/2026
3.1.0-ci1022 45 1/4/2026
3.1.0-ci1021 41 1/4/2026
3.1.0-ci1020 47 1/4/2026
3.1.0-ci1019 44 1/4/2026
3.1.0-ci1018 48 1/4/2026
3.1.0-ci1017 47 1/4/2026
3.1.0-ci1016 48 1/4/2026
3.1.0-ci1014 40 1/4/2026
3.0.0 46 12/12/2025
3.0.0-ci1053 46 1/4/2026
3.0.0-ci1043 45 1/4/2026
3.0.0-ci1042 52 1/4/2026
3.0.0-ci1041 50 1/4/2026
3.0.0-ci1040 44 1/4/2026
3.0.0-ci1039 51 1/4/2026
3.0.0-ci1038 42 1/4/2026
3.0.0-ci1037 49 1/4/2026
3.0.0-ci1036 45 1/4/2026
3.0.0-ci1035 44 1/4/2026
3.0.0-ci1034 42 1/4/2026
3.0.0-ci1033 45 1/4/2026
3.0.0-ci1032 43 1/4/2026
3.0.0-ci1031 45 1/4/2026
3.0.0-ci1029 43 1/4/2026
3.0.0-ci1028 44 1/4/2026
3.0.0-ci1026 43 1/4/2026
2.2.25-ci 39 1/4/2026
2.2.24-ci 42 1/4/2026
2.2.1 45 12/12/2025
2.2.1-ci9006 42 1/4/2026
2.2.1-ci9005 39 1/4/2026
2.2.1-ci9004 39 1/4/2026
2.2.1-ci9003 43 1/4/2026
2.2.1-ci9002 44 1/4/2026
2.2.1-ci9001 44 1/4/2026
2.2.1-ci9000 46 1/4/2026
2.2.1-ci9 38 1/4/2026
2.2.1-ci8 41 1/4/2026
2.2.1-ci7 41 1/4/2026
2.2.1-ci6 48 1/4/2026
2.2.1-ci5 38 1/4/2026
2.2.1-ci4 38 1/4/2026
2.2.1-ci17 46 1/4/2026
2.2.1-ci16 41 1/4/2026
2.2.1-ci11 38 1/4/2026
2.2.1-ci1000 44 1/4/2026
2.2.1-ci10 50 1/4/2026
2.2.0 40 12/12/2025
2.1.267 55 12/11/2025
2.1.266 41 12/11/2025
2.1.265 45 12/11/2025
2.1.262 47 12/11/2025
2.1.1 46 12/12/2025
2.0.0 45 12/12/2025
1.1.2 44 12/12/2025
1.1.1 41 1/4/2026
1.1.0.118 49 12/11/2025