Skip to content

Add NuGetFrameworkStjConverter - #7357

Merged
Nigusu-Allehu merged 4 commits into
devfrom
dev-nyenework-stj-nuget-framework-converter
May 8, 2026
Merged

Nigusu-Allehu merged 4 commits into
devfrom
dev-nyenework-stj-nuget-framework-converter

Conversation

@Nigusu-Allehu

@Nigusu-Allehu Nigusu-Allehu commented May 3, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14880

Description

This is a focused slice of #7301, split per-converter to make reviewing easier.

Converters are being migrated first so that the upcoming Registration resource migrations don't become
bloated PRs.

NuGetFrameworkStjConverter deserializes NuGetFramework from JSON scalar tokens maintaining full behavioral parity with the NSJ NuGetFrameworkConverter.

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.

@Nigusu-Allehu Nigusu-Allehu self-assigned this May 4, 2026
@Nigusu-Allehu
Nigusu-Allehu force-pushed the dev-nyenework-stj-nuget-framework-converter branch from 5516dc6 to 27a7a28 Compare May 6, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a System.Text.Json converter for NuGetFramework as part of the Newtonsoft.Json (NSJ) → System.Text.Json (STJ) migration in NuGet.Protocol, along with parity-focused tests against the existing NSJ converter.

Changes:

  • Introduces NuGetFrameworkStjConverter to deserialize NuGetFramework from JSON scalar tokens.
  • Adds unit tests validating STJ behavior and comparing results with the NSJ NuGetFrameworkConverter.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/NuGet.Core/NuGet.Protocol/Converters/NuGetFrameworkStjConverter.cs Adds the STJ converter implementation for reading/writing NuGetFramework.
test/NuGet.Core.Tests/NuGet.Protocol.Tests/Converters/NuGetFrameworkStjConverterTests.cs Adds coverage to validate scalar-token handling and error behavior.

Copilot AI commented May 7, 2026

Copy link
Copy Markdown
Contributor

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • data.nuget.org
    • Triggering command: /usr/bin/dotnet dotnet test test/NuGet.Core.Tests/NuGet.Protocol.Tests/NuGet.Protocol.Tests.csproj --filter FullyQualifiedName~NuGetFrameworkStjConverterTests -v minimal (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Nigusu-Allehu
Nigusu-Allehu marked this pull request as ready for review May 7, 2026 01:09
@Nigusu-Allehu
Nigusu-Allehu requested a review from a team as a code owner May 7, 2026 01:09
@Nigusu-Allehu
Nigusu-Allehu requested review from jeffkl and nkolev92 May 7, 2026 01:09
@Nigusu-Allehu
Nigusu-Allehu merged commit 5d98568 into dev May 8, 2026
17 of 18 checks passed
@Nigusu-Allehu
Nigusu-Allehu deleted the dev-nyenework-stj-nuget-framework-converter branch May 8, 2026 16:17
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.

Add System.Text.Json equivalent of NuGetFrameworkConverter

5 participants