Open mrakgr opened 1 year ago
In fact it seems that the framework restriction is completely ignored. When running paket upgrade everything resolves to net7.0 although the restriction is in the paket.dependencies file for net6.0, all projects target net6.0 and the global.json is also limited to net6.0.
Yes, the JwtBearer issue is something I've seen too - it's because there's a breaking change between 6 and 7 and the packages that rely on it don't have that max boundary at ~6 so a full update breaks.
We can certainly add that limit into the deps file (although we're now looking to the next SAFE iteration anyway).
To be honest I no longer recommend ever calling paket update
anymore - I always suggest using paket update --keep-major
because it's just too big a change.
Had it with assemblies of Microsoft targeting net8.0 (System.*) currently. We understood just now, that we had the same issue with assemblies of .NET 6.0 some time ago, when .NET 6.0 was released
Description
This is the dependency file for the SAFE template at the time of writing.
Note that it targets .NET 6. When I do a
paket update
with all the projects removed from the solution file, it finishes fine. But with the projects there, I get an error.And indeed, if I look at the lock file, I see something like...
There is a constraint missing that the package should be the latest targeting .NET 6. It instead gets the .NET 7 compatible package.
Repro steps
Assuming that the SAFE template 4.2.0 is installed and paket 7.2.0 is installed globally:
Known workarounds
Adding
nuget Microsoft.AspNetCore.Authentication.JwtBearer ~> 6
into thepaket.dependencies
fixes the issue.