Skip to content

[BUG] .NET8 support (as well as previous versions) is probably broken starting from v2 #377

@andriibratanin

Description

@andriibratanin

I stumbled upon NU1605 error (package downgrade detected) in my project (which targets .NET8 SDK) after installing FusionCache v2.

Checking https://github.com/ZiggyCreatures/FusionCache/blob/main/src/ZiggyCreatures.FusionCache/ZiggyCreatures.FusionCache.csproj:

<TargetFrameworks>netstandard2.0;netcoreapp3.1;net6.0;net7.0;net8.0</TargetFrameworks>

but finding also:

<ItemGroup>
	<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.0" />
</ItemGroup>

Reason:
Version 9 of "Microsoft.Extensions.Caching.Memory" NuGet package (as well as others) is causing NU1603 error in projects targeting .NET8 SDK (and probably 7, 6, etc.).

Arguments:

  • it is probably not right to reference NuGet packages of .NET9 while declaring support only for .NET8 max.
  • OR we are missing conditional ItemGroup in csproj files, like:
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
	<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
	<PackageReference Include="System.Collections.Immutable" Version="8.0.0" /> <!-- not sure if this one is needed -->
</ItemGroup>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions