Migration Guides (v1 -> v2) — Mapper
Upgrade checklist from published NuGet v1.0.0 → v2.0.0 (BC-001–BC-008).
Migrating v1.0.0 to v2.0.0 (BC-001–BC-008)
Section titled “Migrating v1.0.0 to v2.0.0 (BC-001–BC-008)”Mapper.MapsterAOT revocation (BC-001):EricksonLopez.Mapper.Mapsteris markedIsAotCompatible=falsewith[RequiresUnreferencedCode]/[RequiresDynamicCode]. Migrate reflection profiles to[Mapper]partial classes for Native AOT.DateOnly→DateTimeOffsetUTC enforcement (BC-002): Conversions now forceDateTimeKind.Utc.- New compile-time diagnostics (
BC-003–BC-007): Resolve unresolved[MapFactory](ELM017), non-partial[Mapper]interfaces (ELM012), cycles across[MapDerivedType](ELM010), and duplicate[MapProperty](ELM018). Generated HintNames follow{Namespace}_{ClassName}.g.cs. - Nullable collection targets (
BC-008): Nullable destination collections initialize tonullwhen the source collection isnullinstead of an empty list.
Note on Unreleased Local v3.0.0 (BC-009–BC-016)
Section titled “Note on Unreleased Local v3.0.0 (BC-009–BC-016)”Local workspace 3.0.0 (unpublished on NuGet) introduces checked(...) narrowing casts, ELM025 decimal-to-float warnings, DateTimeKind.Unspecified → UTC coercion, Enum.IsDefined validation, {Name}Impl generation for interface mappers, and ELM012 checks on record / record struct.