Mammoth.LiteMapper
4.0.0
See the version list below for details.
dotnet add package Mammoth.LiteMapper --version 4.0.0
NuGet\Install-Package Mammoth.LiteMapper -Version 4.0.0
<PackageReference Include="Mammoth.LiteMapper" Version="4.0.0" />
<PackageVersion Include="Mammoth.LiteMapper" Version="4.0.0" />
<PackageReference Include="Mammoth.LiteMapper" />
paket add Mammoth.LiteMapper --version 4.0.0
#r "nuget: Mammoth.LiteMapper, 4.0.0"
#:package Mammoth.LiteMapper@4.0.0
#addin nuget:?package=Mammoth.LiteMapper&version=4.0.0
#tool nuget:?package=Mammoth.LiteMapper&version=4.0.0
Mammoth.LiteMapper
Mammoth.LiteMapper is a convention-first, compile-time object mapping library for C#.
Consumers declare partial mapping methods on classes marked with [LiteMapper]. A Roslyn incremental source generator emits direct C# implementations using constructors, assignments, loops, casts, and ordinary method calls. LiteMapper is not a runtime mapping container and does not provide runtime mapper registration, assembly scanning, reflection fallback, or dynamic dispatch.
Assembly-wide defaults and external mapper registrations are compile-time configuration. Rebuild after changing them. Generated helpers are private; call only the mapping methods you declare and do not depend on helper names or signatures.
Compilation Status
Quickstart
Install the published stable primary package, 3.0.0, in a project without central package management:
<PackageReference Include="Mammoth.LiteMapper" Version="3.0.0" />
For central package management, put the version in Directory.Packages.props instead; see installation. The version notes distinguish 3.0.0 from unreleased fixes in this checkout.
Declare a mapper:
using Mammoth.LiteMapper;
[LiteMapper]
public static partial class CustomerMapper
{
public static partial CustomerDto Map(Customer source);
}
Use the generated method like ordinary C#:
CustomerDto dto = CustomerMapper.Map(customer);
See the compiling samples under samples/ for static mappers, instance mappers, collections, recursive mappings, and ASP.NET Core usage.
Ordinary unmapped target members are reported as LITEMAPPER1001 errors by default. Explicit mapper or method UnmappedMemberPolicy values and standard compiler severity configuration may intentionally relax this configurable diagnostic; doing so preserves valid generation but is not proof of complete target coverage. Required, non-nullable, inaccessible, invalid, and otherwise mandatory target obligations remain hard errors. Projects requiring mandatory unmapped-target coverage should treat LITEMAPPER1001 as an error in CI and audit or avoid project-wide suppression.
Documentation
- SPECIFICATION.md is the sole authoritative product contract.
- USAGE.md is the usage guide and must stay synchronized with the specification, samples, tests, and other project documents.
Agent skill
The mammoth-litemapper skill provides consumer mapping guidance for compatible coding agents using the Skills CLI.
Install the skill from the explicit develop branch, which includes guidance for 3.0.0 and clearly marked unreleased corrections:
npx skills add https://github.com/PrimordialCode/Mammoth.LiteMapper/tree/develop/skills/mammoth-litemapper --skill mammoth-litemapper
Append --agent codex to target Codex or --global for user-level installation. To preview this checkout without installing, run npx skills add ./skills/mammoth-litemapper --list from the repository root. The skill includes its supporting reference and needs no source checkout. Installing the skill does not upgrade the NuGet package; verify the package version before using an unreleased correction.
| Product | Versions 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-browser 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. |
-
.NETStandard 2.0
- Mammoth.LiteMapper.Abstractions (>= 4.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1 | 42 | 10/15/2026 |
| 4.0.0 | 40 | 10/14/2026 |
| 3.0.0 | 99 | 9/17/2026 |
| 3.0.0-beta.2 | 60 | 9/17/2026 |
| 3.0.0-beta.1 | 68 | 9/17/2026 |
| 2.0.0 | 98 | 9/10/2026 |
| 2.0.0-beta.1 | 66 | 9/10/2026 |
| 1.0.0 | 127 | 6/22/2026 |
| 1.0.0-beta.2 | 78 | 6/22/2026 |
| 1.0.0-beta.1 | 77 | 6/19/2026 |