Skip to content

Target NuGet libraries at .NET 10 - #7657

Merged
nkolev92 merged 3 commits into
NuGet:devfrom
eerhardt:dev-eerhardt-net10-libraries
Aug 27, 2026
Merged

nkolev92 merged 3 commits into
NuGet:devfrom
eerhardt:dev-eerhardt-net10-libraries

Conversation

@eerhardt

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#15062

Description

Replace the net8.0 target with net10.0 for NuGet client class libraries. NuGet.Protocol uses a System.Text.Json source-generated context for plugin messages, and the .NET 10 source generator no longer references the types of [JsonIgnore] properties. Compiling against .NET 10 therefore avoids rooting ignored JObject compatibility properties and their associated Newtonsoft.Json Native AOT graph.

This changes the shared library target frameworks from net472;net8.0 to net472;net10.0 and moves per-TFM PublicAPI baselines accordingly.

Validation:

  • Built all 14 projects using TargetFrameworksLibrary for net10.0.
  • Verified dotnet format whitespace --verify-no-changes NuGet.sln.
  • Packed NuGet.Protocol and confirmed it contains lib/net472/NuGet.Protocol.dll and lib/net10.0/NuGet.Protocol.dll.
  • Consumed the net10.0 libraries from Aspire CLI Native AOT analysis and confirmed the ignored-property/JValue retention chain is removed.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

Replace the net8.0 library target with net10.0 and move per-TFM API baselines accordingly.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: baa86aab-4a9f-44c7-a92e-34f6498c9e4e
@eerhardt
eerhardt requested a review from a team as a code owner August 26, 2026 21:01
@dotnet-policy-service dotnet-policy-service Bot added the Community PRs created by someone not in the NuGet team label Aug 26, 2026
nkolev92
nkolev92 previously approved these changes Aug 26, 2026
zivkan
zivkan previously approved these changes Aug 26, 2026
Nigusu-Allehu
Nigusu-Allehu previously approved these changes Aug 26, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: baa86aab-4a9f-44c7-a92e-34f6498c9e4e
@eerhardt
eerhardt dismissed stale reviews from Nigusu-Allehu, zivkan, and nkolev92 via 3cc0ef0 August 26, 2026 23:01
Nigusu-Allehu
Nigusu-Allehu previously approved these changes Aug 26, 2026
Co-authored-by: Copilot App <[email protected]>

Copilot-Session: baa86aab-4a9f-44c7-a92e-34f6498c9e4e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PRs created by someone not in the NuGet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Target NuGet client libraries at .NET 10 to avoid retained JsonIgnore property types

5 participants