NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet
NuGet, #1633 most downloaded on NuGet
Dependency Injection supports for Mapster
Latest stable
10.0.14
Last release 20 days ago
02 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Most releases are documented
notes for 11 of 14 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
41 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
10.1 - Add optimal constructor selector by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/1028
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.1.0-pre03...v10.1.0-pre04
Setting UseDestinationValue you can use for all Properties of DestinationType , including the writable property _example: string Property {get; set;};
UseDestinationValue you can use for all Properties of DestinationType , including the writable property
example: string Property {get; set;};Map() override the Ignore() setting, Excluding cases ExtraSource(Multiple sources) mappingMap() improvements:
1.1) Added supported different types source in Mapping with condition cases;
Example: TypeAdapterConfig<DiffPoco, DiffDto>.NewConfig()
.Map(dest => dest.Value, src => src.ValueInt, cond => cond.Checker == 1)
.Map(dest => dest.Value, src => src.ValueString, cond => cond.Checker == 2)
.Map(dest => dest.Value, src => src.ValueBool, cond => cond.Checker == 3)
.Map(dest => dest.Value, src => src.Checker);
1.2) The analysis of the source passed as a parameter has been improved to enable the use of Null propagation.
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.1.0-pre02...v10.1.0-pre03
Your coding agent can read these notes before it upgrades. Set up the MCP server →
added support DefaultValue() from constructor mapping;
Fix:
DefaultValue() from constructor mapping;MapUsing() from ExtraSource/Flattening mapping.Improvements:
ReMap() setting setter - Map() for Ignored member and an additional option to skip the application of Destination Transformsconfig.Default.AddDestinationTransform(DestinationTransform.EmptyCollectionIfNull);
config.ForDestinationType<DestinationFlattentData>()
.Ignore(x => x.Value);
config.NewConfig<SourceFlattentInsaider, DestinationFlattentData>()
.ReMap(dest => dest, src => src.SrcData, true);
var result = src.Adapt<DestinationFlattentData>(config);
result.Collection.ShouldBeNull(); // all member from ExtraSource - SrcData has skip DestinationTransform.EmptyCollectionIfNull
result.Value.ShouldBe("Hello"); // property Value has value from ExtraSource - SrcData
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.1.0-pre01...v10.1.0-pre02
config.ForDestinationType () .DefaultValue(x => 42);
DefaultValue() - Custom default value for Destination type
config.ForDestinationType<int>()
.DefaultValue(x => 42);
int? src = null;
var result = src.Adapt<int>(config); // result == 42
var result = src.Adapt<int>(); // By default result will be equal to 0 - the default value for type Int
MapUsing() - Map Property/Field with using Override type mapping settingsUnlike Map(), which is designed to specify an alternative source for a Property/Field, using MapUsing() you can set unique settings for mapping types for the specified Property/Field:
int? src = null;
var srcData = new NullablIData() { Data = null };
config.
NewConfig<NullablIData, NullablIData>()
.MapUsing(dest => dest.Data, src => src.Data, cfg =>
{
cfg.ReConfigurate()
.DefaultValue(x => 42);
});
var resultData = srcData.Adapt<NullableData>(config); // result.Data == 42
var result = src.Adapt<int?>(config); // result == null
Does not support ExtraSource/Flattening mapping - .Map(dest => dest, src => src.Props)
By default Override type mapping settings has will contain all the settings, which are installed in the settings setter pipeline (merge default settings for a type and specific settings.)
// default settings setter
config.Default
config.ForDestinationType<TDestination>()
// specific settings setter
config.ForType<TSource,TDestination>()
config.NewConfig<TSource,TSource>()
2.1) Additional behavior for Override type mapping settings
2.1.1) .ReConfigurate() - Allows you to set or override existing settings.
.MapUsing(dest => dest.Data, src => src.Data, cfg =>
{
cfg.ReConfigurate()
.DefaultValue(x => 42);
});
[!Note] Some settings cannot be overridden due to the way it is stored.
2.1.2) .SkipAllSettings(true) - create new config like using .NewConfig<TSource,TSource>() In this case, no default settings are applied.
.MapUsing(src => src.Data, dest => dest.Data,
cfg =>
{
cfg.SkipAllSettings(true);
})
2.1.3) .SkipSettings() - Prevents the application of the selected settings
[!CAUTION] This setter will be removed in release. If you need Skip the settings that can be accessed using this method, please leave a comment in this release discussion or submit a PR. Thanks!
.MapUsing(src => src.ArrayData, dest => dest.ListData,
cfg =>
{
cfg.SkipSettings(x=>x.DestinationTransforms);
})
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.11...v10.1.0-pre01
MapsterTool added global:: prefix when PrintFullTypeName enable by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/1026
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.13...v10.0.14
MapsterTool added global:: prefix when PrintFullTypeName enable by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/1026
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.13...v10.0.14-pre01
v10.0.14-pre01 Pre-release
Pre-release
Compare
Improvements for Mapster Tool by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/1016
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.12...v10.0.13
Improvements for Mapster Tool by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/1016
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.12...v10.0.13-pre02
v10.0.13-pre02 Pre-release
Pre-release
Compare
chore: Bump version to v10.0.13-pre01
chore: Bump version to v10.0.13-pre01
Fix/1007 ignoreif record property by @alihut in https://github.com/MapsterMapper/Mapster/pull/1008
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.11...v10.0.12
fix: fall back to src-relative snk when SolutionDir is unset (#848) by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/997
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.10...v10.0.11
Fix #520 - Ignore() settings setter potential Nullable warning by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/991
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.9...v10.0.10
test: ensure Compile skips open generic mapping rules (#925) by @wyf027 in https://github.com/MapsterMapper/Mapster/pull/965
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8...v10.0.9
feat: add Flattening mapping for all source type by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/916
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/10.0.7...v10.0.8
Actualize benchmark by @Qyperion in https://github.com/MapsterMapper/Mapster/pull/946
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre06...v10.0.8-pre07
Refactoring fix #903 and fix #943 by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/945
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre05...v10.0.8-pre06
feat: #938 - Add DirectAssignmentForSameType() by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/941
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre04...v10.0.8-pre05
fix IgnoreNonMapped member collector #924 by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/929
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre03...v10.0.8-pre04
fix race condition when mapping to Record used IgnoreNullValues by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/923
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre02...v10.0.8-pre03
fix IsNotSelfCreation detect by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/919
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.8-pre01...v10.0.8-pre02
feat: add Flattening mapping for all source type by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/916
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/10.0.7...v10.0.8-pre01
Fix: regression when update required property by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/902
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.6...10.0.7
fix: IgnoreNullValues regression from MapToTarget cases in #905 by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/908
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.7-pre03...10.0.7-pre04
Fix regression when abstract destination type have required properties by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/907
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.7-pre02...v10.0.7-pre03
Fix bug in #903 and Fix #858 by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/905
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.7-pre01...v10.0.7-pre02
Fix: regression when update required property by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/902
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.6...v10.0.7-pre01
Fix #883 - Add class ctor using default value for param
In version 7.4.0 this feature was only available for record types
If you encountered this mapping behavior in 7.4.0, it is possible that your class was recognized as a record type, or was mistakenly recognized as a record type See more.
If you need the mapping behavior as for Record, in v10.0+ you can use - [AdaptWith(AdaptDirectives.DestinationAsRecord)] .
If you need the ability to set this setting without using attributes, open issue on this topic.
Example:
[AdaptWith(AdaptDirectives.DestinationAsRecord)]
public class SimpleRecord
{
public int Id { get; private set; }
public string Name { get; private set; }
public SimpleRecord(int id, string name)
{
this.Id = id;
this.Name = name;
}
}
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.4...v10.0.6
Nothing published for this version
Nothing published for this version
Fix #883 - Add class ctor using default value for param by @DocSvartz in https://github.com/MapsterMapper/Mapster/pull/885
In version 7.4.0 this feature was only available for record types
If you encountered this mapping behavior in 7.4.0, it is possible that your class was recognized as a record type, or was mistakenly recognized as a record type See more.
If you need the mapping behavior as for Record, in v10.0+ you can use - [AdaptWith(AdaptDirectives.DestinationAsRecord)] .
If you need the ability to set this setting without using attributes, open issue on this topic.
Example:
[AdaptWith(AdaptDirectives.DestinationAsRecord)]
public class SimpleRecord
{
public int Id { get; private set; }
public string Name { get; private set; }
public SimpleRecord(int id, string name)
{
this.Id = id;
this.Name = name;
}
}
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v10.0.0...v10.0.4
Add support for .NET 8.0 by @andrerav in https://github.com/MapsterMapper/Mapster/pull/631
Full Changelog: https://github.com/MapsterMapper/Mapster/compare/v7.4.0...v10.0.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.