Skip to content

Clean up our System.Text.Json references #39902

@marcpopMSFT

Description

@marcpopMSFT

In digging through https://github.com/dotnet/sdk/pull/39901/files, we realized that our logic for UseSystemTextJson is a bit off.

We now use system.text.json even on framework builds. I believe @ladipro has a change to make this even more common. On framework, we need to ensure we have an 8.0.0 reference.

For core, we shouldn't have a reference at all (but we add it in a couple of places).

Changes needed:

  1. Ensure all projects that run in framework and use System.Text.Json have an explicit 8.0.0 reference
  2. Put that version in the versions.props file so it's easier to update in main
    a. It appears to be in main already but unused: https://github.com/dotnet/sdk/blob/main/eng/Versions.props#L38
  3. remove the reference in .net core builds where we're accidentally adding it (search for UseSystemTextJson and review the logic there)

Metadata

Metadata

Assignees

Labels

untriagedRequest triage from a team member

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions