Riok.Mapperly 3.2.0

The ID prefix of this package has been reserved for one of the owners of this package by Prefix Reserved
.NET Standard 2.0
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Riok.Mapperly --version 3.2.0
NuGet\Install-Package Riok.Mapperly -Version 3.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Riok.Mapperly" Version="3.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Riok.Mapperly --version 3.2.0
#r "nuget: Riok.Mapperly, 3.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Riok.Mapperly as a Cake Addin
#addin nuget:?package=Riok.Mapperly&version=3.2.0

// Install Riok.Mapperly as a Cake Tool
#tool nuget:?package=Riok.Mapperly&version=3.2.0


Nuget Nuget Preview License Downloads GitHub Sponsors GitHub

Mapperly is a .NET source generator for generating object mappings.

Because Mapperly creates the mapping code at build time, there is minimal overhead at runtime. Even better, the generated code is perfectly readable, allowing you to verify the generated mapping code easily.


The documentation is available here.



Add the NuGet Package to your project:

dotnet add package Riok.Mapperly

Create your first mapper

Create a mapper declaration as a partial class and apply the Riok.Mapperly.Abstractions.MapperAttribute attribute. Mapperly generates mapping method implementations for the defined mapping methods in the mapper.

// Mapper declaration
public partial class CarMapper
    public partial CarDto CarToCarDto(Car car);

// Mapper usage
var mapper = new CarMapper();
var car = new Car { NumberOfSeats = 10, ... };
var dto = mapper.CarToCarDto(car);

Read the docs for any further information.


Find a list of breaking changes for each major version and upgrade guides here.

How To Contribute

We would love for you to contribute to Mapperly and help make it even better than it is today! Find information on how to contribute in the docs.


Mapperly is Apache 2.0 licensed.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Riok.Mapperly:

Package Downloads
Fanzoo.Kernel The ID prefix of this package has been reserved for one of the owners of this package by

An opinionated framework for building scalable web applications.

Eternet.AspNetCore.DocumentDb.Crud The ID prefix of this package has been reserved for one of the owners of this package by

AspNet Core DocumentDb CRUD framework using Marten for Document DB and Events Store


Including Areas in Group as Branches


This package contains Mapperly implementations of the Umbrella.Utilities.Mapping.Abstractions interfaces.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Riok.Mapperly:

Repository Stars
A .NET source generator for generating object mappings. No runtime reflection.
A high performance implementation of Mediator pattern in .NET using source generators.
Build everything for everywhere using what you already know and love ❤️
The best cross-platform Plex media downloader there is! In active development and feedback is very welcome!
Sample implementation of LoRaWAN components to connect LoRaWAN antenna gateway running IoT Edge directly with Azure IoT.
Version Downloads Last updated
3.3.0-next.6 59 12/6/2023
3.3.0-next.5 243 11/28/2023
3.3.0-next.4 474 11/22/2023
3.3.0-next.3 672 11/19/2023
3.3.0-next.2 1,046 10/26/2023
3.3.0-next.1 1,712 10/11/2023
3.2.0 162,386 9/18/2023
3.2.0-next.4 737 9/12/2023
3.2.0-next.3 415 9/11/2023
3.2.0-next.2 187 9/5/2023
3.2.0-next.1 431 8/29/2023
3.1.0 84,857 8/18/2023
3.1.0-next.2 76 8/18/2023
3.1.0-next.1 2,846 8/8/2023
3.0.0 21,782 8/7/2023
3.0.0-next.1 254 8/2/2023
2.9.0-next.4 2,962 7/26/2023
2.9.0-next.3 392 7/16/2023
2.9.0-next.2 4,430 6/13/2023
2.9.0-next.1 5,006 5/11/2023
2.8.0 318,511 4/27/2023
2.8.0-next.2 490 4/20/2023
2.8.0-next.1 12,649 3/23/2023
2.7.1-next.1 634 3/17/2023
2.7.0 94,117 3/13/2023
2.7.0-next.2 698 1/26/2023
2.7.0-next.1 585 1/23/2023
2.6.0 58,632 1/12/2023
2.6.0-next.4 93 1/11/2023
2.6.0-next.3 139 1/9/2023
2.6.0-next.2 262 12/14/2022
2.6.0-next.1 537 12/12/2022
2.5.0 63,318 10/12/2022
2.5.0-next.2 285 9/28/2022
2.5.0-next.1 179 9/19/2022
2.4.1-next.1 147 9/16/2022
2.4.0 11,292 9/8/2022
2.3.3 2,568 8/10/2022
2.3.2 475 8/9/2022
2.3.1 60,060 5/31/2022
2.3.0 1,960 5/16/2022
2.2.1 3,081 4/6/2022
2.2.0 840 3/15/2022
2.1.0 652 2/28/2022
2.0.0 522 2/21/2022

# [3.2.0]( (2023-09-18)

### Bug Fixes

* add correct type for default null-fallback statements when using nullable value types ([4fa4163](
* Allow multiple MapEnumValueAttribute ([#672]( ([71cbfdd](
* fix spacing for casts and enum parse mappings ([#747]( ([137f2fb](
* generate correct nullability for external array elements ([#715]( ([7bf8104](
* prevent null initializing readonly members ([#678]( ([f3d78b4](
* remove interface from attribute targets on the mapper attribute ([#686]( ([b7e6e20](
* resolve user implemented mappings correctly in queryable projections ([#736]( ([8cee739](
* reuse user defined modifiers in method signatures ([#734]( ([dcb2eff](

### Features

* add mapper defaults attribute for assemblies ([#657]( ([765aa0b](
* Add option to use other mappers ([#661]( ([975f374](
* C[#12]( type alias support ([#719]( ([c2f1f4f](
* generate diagnostic warning when ignored members are explicitly mapped ([#708]( ([4cd4e3a](
* Implement custom source formatting to improve performance ([#706]( ([44b5df9](
* Remove runtime dependency on Riok.Mapperly.Abstractions ([#711]( ([f26f026](, closes [#685](
* Support C[#12]( primary constructors ([#720]( ([b54b9a5](
* support for Roslyn 4.7 ([#718]( ([876713d](