-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
I stumbled upon NU1605 error (package downgrade detected) in my project (which targets .NET8 SDK) after installing FusionCache v2.
<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>
juantxorenarcollina
Metadata
Metadata
Assignees
Labels
No labels