AutomapperIgnoreNullValues: retarget net10.0, bump AutoMapper 16.2.0, fix MapperConfiguration ctor break, drop Newtonsoft.Json - #2127
Merged
vladimir-pecanac-main merged 2 commits intoAug 25, 2026
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the
dotnet-client-libraries/AutomapperIgnoreNullValuessample alongside a refresh of the linked article.net7.0tonet10.0.12.0.1->16.2.0. The current package declares noMapperConfigurationoverload without anILoggerFactory, so the existing one-argument call inConsole/AutoMapperManager.csfailed to compile withCS1729. It now passesNullLoggerFactory.Instance, via aMicrosoft.Extensions.Logging.Abstractionsreference.System.Text.Json, which removes theNewtonsoft.Json10.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.