A Roslyn-based Visual Studio extension that generates object-to-object mapping code at design time, similar to AutoMapper.
MappingGenerator is a Roslyn-based code fix provider that generates object-to-object mapping code at design time within .NET IDEs. It automates the creation of explicit mapping methods, constructors, and initialization blocks, solving the problem of tedious and error-prone manual mapping while avoiding the runtime costs of reflection-based tools.
.NET developers working in Visual Studio, JetBrains Rider, or VSCode who need to map between DTOs, entities, or other object types frequently and prefer explicit, debuggable code over runtime mapping.
Developers choose MappingGenerator because it provides the convenience of AutoMapper-like automation without runtime reflection overhead, generating clean, type-safe C# code directly in the editor that is easy to debug, refactor, and understand.
:arrows_counterclockwise: "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Generates clean, debuggable C# mapping code directly in the IDE, as shown in GIFs for pure mapping methods and constructors, eliminating manual boilerplate.
Produces compile-time code without reflection overhead, ensuring type safety and better performance compared to runtime mappers like AutoMapper, per the project's motivation.
Works in Visual Studio, JetBrains Rider, and VSCode via extensions or NuGet packages, offering flexibility across popular .NET development environments.
Provides quick fixes for C# errors like CS0029 and CS0266 by generating conversion code, speeding up debugging and reducing manual intervention.
The free open-source version is archived and discontinued; continued use requires purchasing a commercial license, which may be a barrier for open-source or budget-limited projects.
Users with Resharper may face conflicts, requiring manual settings adjustments to enable Roslyn refactoring menus, as noted in the README with a screenshot and issue reference.
Generates code only at design time, so it cannot handle dynamic mapping scenarios that runtime mappers support, such as configuration-based mappings or runtime type resolution.
Mapping Generator is an open-source alternative to the following products: