Repository navigation
Migrate global.json SDK reader to System.Text.Json - #7755
Merged
Merged
Conversation
baronfel
marked this pull request as ready for review
October 6, 2026 22:33
eerhardt
reviewed
Oct 7, 2026
zivkan
reviewed
Oct 8, 2026
Use the shared UTF-8 reader directly and preserve localized parse reasons and one-based locations. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
baronfel
force-pushed
the
baronfel-aot-global-json-reader
branch
from
October 8, 2026 17:52
bc277e9 to
ac662d4
Compare
zivkan
approved these changes
Oct 9, 2026
2 of 3 tasks
This was referenced Oct 13, 2026
2 of 3 tasks
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.
Description
Migrates the MSBuild SDK resolver's
global.jsonreader from Newtonsoft.Json to the shared streaming System.Text.Json reader.The new reader preserves the existing resolver behavior, including file caching, UTF-8 BOM handling, caller-owned stream lifetime, last-duplicate-wins semantics, comments and trailing commas, and ignoring non-string SDK version values. Malformed JSON diagnostics now use the normal System.Text.Json exception message.
The NativeAOT compatibility project now roots
Microsoft.Build.NuGetSdkResolverso the resolver is included in trimming and AOT analysis. Its executable test program is unchanged.This follows #7717, the first reader migration, and is extracted from #7601, the overall SDK resolver/MSBuild NativeAOT work.
This is the second of six PRs incrementally converting NuGet.Client's remaining readers and writers to STJ.
Validation:
PR Checklist