ForgeMap 1.7.0

dotnet add package ForgeMap --version 1.7.0
                    
NuGet\Install-Package ForgeMap -Version 1.7.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="ForgeMap" Version="1.7.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForgeMap" Version="1.7.0" />
                    
Directory.Packages.props
<PackageReference Include="ForgeMap" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ForgeMap --version 1.7.0
                    
#r "nuget: ForgeMap, 1.7.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.
#:package ForgeMap@1.7.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ForgeMap&version=1.7.0
                    
Install as a Cake Addin
#tool nuget:?package=ForgeMap&version=1.7.0
                    
Install as a Cake Tool

ForgeMap

CI NuGet NuGet Downloads License: MIT

A lightweight, MIT-licensed, source-generator-based object transformation library for .NET. ForgeMap generates type conversion code at compile time, providing zero-reflection runtime execution with compile-time type safety.

Features

  • Source Generator - Compile-time code generation, no runtime reflection
  • Zero Overhead - Generated code is as fast as hand-written code
  • Type Safe - Compile-time validation of mappings
  • Debuggable - Generated code is readable and debuggable
  • MIT License - Fully open source, no commercial restrictions

Installation

dotnet add package ForgeMap

Quick Start

using ForgeMap;

// 1. Define your types
public class OrderEntity
{
    public string Id { get; set; }
    public string CustomerName { get; set; }
    public DateTime OrderDate { get; set; }
}

public class OrderDto
{
    public string Id { get; set; }
    public string CustomerName { get; set; }
    public DateTime OrderDate { get; set; }
}

// 2. Create a forger class
[ForgeMap]
public partial class AppForger
{
    public partial OrderDto Forge(OrderEntity source);
}

// 3. Use it
var forger = new AppForger();
var dto = forger.Forge(entity);

Performance

ForgeMap is the fastest in benchmarks against AutoMapper and Mapperly (.NET 9, AMD EPYC 7763):

Scenario ForgeMap Mapperly AutoMapper
Simple (10 props) 14.5 ns 15.9 ns (1.1x) 80.7 ns (5.6x)
Nested (2 levels) 27.3 ns 30.7 ns (1.1x) 92.5 ns (3.4x)
Deep (4 levels) 31.3 ns 35.8 ns (1.1x) 247.0 ns (7.9x)
Collection (1000) 17.7 us 20.1 us (1.1x) 22.2 us (1.3x)

See benchmarks/BENCHMARK_RESULTS.md for full details.

Migrating from AutoMapper

See the Migration Guide for step-by-step instructions and before/after code examples. ForgeMap also includes an AI-assisted migration tool (Claude Code skill) that can convert your existing AutoMapper CreateMap/Profile configurations to ForgeMap attributes automatically. See ForgeMap vs AutoMapper & Mapperly for a detailed feature comparison.

Documentation

See SPEC.md for the full specification. See CHANGELOG.md for version history.

License

MIT

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-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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.7.0 1,048 4/23/2026
1.6.0 134 4/10/2026
1.5.0 109 4/8/2026
1.4.0 106 4/5/2026
1.3.0 106 3/26/2026
1.2.0 103 3/24/2026
1.1.0 100 3/23/2026
1.0.0 107 3/19/2026