dotnet / dotnet/project-system

System.Collections.Immutable version 7.0.0 warns about not supporting .net 7.0

Open
#8,879 14 comments 1 reaction 0 assignees View on GitHub
Feature-NuGet Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

### Description

When using the System.Collections.Immutable version 7.0.0 NuGet package from a .net 7.0 project the following warning is generated when building

`...\.nuget\packages\system.collections.immutable\7.0.0\buildTransitive\netcoreapp2.0\System.Collections.Immutable.targets(4,5): Warning : System.Collections.Immutable 7.0.0 doesn't support net7.0 and has not been tested with it. Consider upgrading your TargetFramework to net6.0 or later. You may also set true in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.`

### Reproduction Steps

Install the System.Collections.Immutable version 7.0.0 NuGet package in a .net 7.0 project and build.

### Expected behavior

System.Collections.Immutable version 7.0.0 should support .net 7.0. And it certainly should never suggest to "upgrade" to an earlier version.

### Actual behavior

The following warning is generated when building

`...\.nuget\packages\system.collections.immutable\7.0.0\buildTransitive\netcoreapp2.0\System.Collections.Immutable.targets(4,5): Warning : System.Collections.Immutable 7.0.0 doesn't support net7.0 and has not been tested with it. Consider upgrading your TargetFramework to net6.0 or later. You may also set true in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk.`

### Regression?

N/A

### Known Workarounds

You could add `true` to your project file, but then it may also hide relevant warnings.

### Configuration

* Which version of .NET is the code running on?
Presumably MSBuild runs on .net 7

* What OS and version, and what distro if applicable?
Windows 11 version 10.0.22621.963

* What is the architecture (x64, x86, ARM, ARM64)?
x64

* Do you know whether it is specific to that configuration?
Highly doubt it

* If you're using Blazor, which web browser(s) do you see this issue in?
N/A

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.