Skip to content

AutomapperIgnoreNullValues: retarget net10.0, bump AutoMapper 16.2.0, fix MapperConfiguration ctor break, drop Newtonsoft.Json - #2127

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/96340-automapper-how-to-ignore-null-values
Aug 25, 2026
Merged

AutomapperIgnoreNullValues: retarget net10.0, bump AutoMapper 16.2.0, fix MapperConfiguration ctor break, drop Newtonsoft.Json#2127
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/96340-automapper-how-to-ignore-null-values

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Updates the dotnet-client-libraries/AutomapperIgnoreNullValues sample alongside a refresh of the linked article.

  • Retargets both projects from net7.0 to net10.0.
  • Bumps AutoMapper 12.0.1 -> 16.2.0. The current package declares no MapperConfiguration overload without an ILoggerFactory, so the existing one-argument call in Console/AutoMapperManager.cs failed to compile with CS1729. It now passes NullLoggerFactory.Instance, via a Microsoft.Extensions.Logging.Abstractions reference.
  • Moves the console-output serialization from Newtonsoft.Json to System.Text.Json, which removes the Newtonsoft.Json 10.0.3 package reference from the console project. The printed output is byte-identical.

Build is clean and all 8 tests pass on .NET 10.0.10.

… fix MapperConfiguration ctor, swap to System.Text.Json

- Both projects retargeted from net7.0 to net10.0.
- AutoMapper 12.0.1 -> 16.2.0. The current package declares no MapperConfiguration
  overload without an ILoggerFactory, so the existing one-argument call in
  Console/AutoMapperManager.cs failed with CS1729. It now passes
  NullLoggerFactory.Instance, via a Microsoft.Extensions.Logging.Abstractions
  reference.
- Console output serialization moved from Newtonsoft.Json to System.Text.Json,
  removing the Newtonsoft.Json 10.0.3 package reference; output is unchanged.

Build clean and 8/8 tests pass on .NET 10.0.10.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit d341ea9 into CodeMazeBlog:main Aug 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant