Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Text.Json should not be installed successfully on netcoreapp3.1 #107271

Closed
RoderickIveans opened this issue Sep 3, 2024 · 9 comments
Closed

Comments

@RoderickIveans
Copy link

Description

My project's target framework is netcore3.1, and when I finished installing System.Text.Json, I received the following warning. If netcoreapp3.1 is not supported and is untested, I would rather not be able to install it than receive a warning or have it actively suppressed.

System.Text.Json 8.0.4 doesn't support netcoreapp3.1 and has not been tested with it. Consider upgrading your TargetFramework to net6.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.

Reproduction Steps

NuGet UI install System.Text.Json

Expected behavior

install failure

Actual behavior

Install successfully and receive a warning

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 3, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

@huoyaoyuan
Copy link
Member

Since netcoreapp3.1 supports netstandard2.0, it's compatible with System.Text.Json, and probably works. But we do not guarantee any support on the configuration.

If netcoreapp3.1 is not supported and is untested, I would rather not be able to install it than receive a warning or have it actively suppressed.

This is not directly achievable with the current NuGet mechanism.
We do not want to block the users of outdated frameworks forcefully, just discouraging them.

This is not limited to System.Text.Json. Packages provided in dotnet/runtime are all enabling the warning.

@RoderickIveans
Copy link
Author

Since netcoreapp3.1 supports netstandard2.0, it's compatible with System.Text.Json, and probably works. But we do not guarantee any support on the configuration.

As you said, it is possible to work, we do not want a half-finished product, we would rather not have it.

@huoyaoyuan
Copy link
Member

As you said, it is possible to work, we do not want a half-finished product, we would rather not have it.

Note that .NET Core 3.1 has been out of support for several years. It's more unreliable to continue using the framework than NuGet packages.

The warning message doesn't come with a warning ID. If it does, you can simply turn on WarnAsError for the ID. @dotnet/area-infrastructure-libraries

@RoderickIveans
Copy link
Author

Note that .NET Core 3.1 has been out of support for several years. It's more unreliable to continue using the framework than NuGet packages.

The warning message doesn't come with a warning ID. If it does, you can simply turn on WarnAsError for the ID. @dotnet/area-infrastructure-libraries

Since .NET Core 3.1 isn't supported anymore, you guys really shouldn't be releasing packages that can be installed on .NET Core 3.1. If these packages can be installed, they should have been thoroughly tested and not feel half-baked. Users shouldn't have to suppress warnings to make things work.

@timcassell
Copy link

If you install version 6.x or older, you shouldn't get the warning.

The .Net Standard nuget package support is frustratingly bad on Core runtimes.

@timcassell
Copy link

More info: open-telemetry/opentelemetry-dotnet#3448

@huoyaoyuan
Copy link
Member

Since .NET Core 3.1 isn't supported anymore, you guys really shouldn't be releasing packages that can be installed on .NET Core 3.1.

They are not intentionally made installable on .NET Core 3.1. They are just transitively available as the side effect of supporting .NET Standard and .NET Framework.

We won't take additional effort to benefit the users of outdated frameworks, but if it comes for free, we would left things as-is for best availability.

@filipnavara
Copy link
Member

filipnavara commented Sep 3, 2024

we do not want a half-finished product

As previously pointed out, you start by using .NET Core 3.1 which was out of support since December 13, 2022. System.Text.Json should be the least of your worries. No security updates were released for the core runtime since then, while there was plenty of vulnerabilities fixed in the supported releases since then.

@eiriktsarpalis eiriktsarpalis closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Sep 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants