Paket
Paket copied to clipboard
Error "Could not parse framework 'net6.0'. Try to update or install again or report a paket bug."
Description
Trying to upgrade a project from net5.0 to net6.0 I got the error message from paket "Could not parse framework 'net6.0'. Try to update or install again or report a paket bug.". I just upgraded to last version (stable and preview) to no avail: 6.2.1 and 7.0.0-alpha003.
Repro steps
- Clone FSharpLint master.
- Upgrade FCS to latest version.
- (Because the previous upgrade doesn't work in .net5.0: ) upgrade all projects and CI to .net6.0.
- Build fails, so I upgrade paket to 6.2.1.
- Build still fails, so I upgrade paket to 7.0.0-alpha003.
Expected behavior
Should build?
Actual behavior
Throws error:
Run dotnet fake build -t Test
Extracted Paket.Restore.targets to: /home/runner/work/FSharpLint/FSharpLint/.paket/Paket.Restore.targets (Can be disabled with PAKET_SKIP_RESTORE_TARGETS=true)
Performance:
- Cli parsing: 283 milliseconds
- Packages: 114 milliseconds
- Script analyzing: 206 milliseconds
- Runtime: 686 milliseconds
There was a problem while setting up the environment:
-> Error in paket.dependencies line 3
Could not parse framework 'net6.0'. Try to update or install again or report a paket bug.
Hint: If you just upgraded the fake-runner you can try to remove the .fake directory and try again.
Known workarounds
Nope.
Each of the steps described above is a commit in the following experimental branch (where you can see the CI log): https://github.com/knocte/FSharpLint/commits/fcsAndNet6upgrade
This isn't a paket problem, it's a fake problem. Fake bundles paket for use in the script runner, and it's version is out of date. This is part of the larger effort in game to get it updated for dotnet 6, which is still ongoing.
Workarounds include:
- using nuget refs instead of paket refs in your fake script,
- using fake from a console application instead of using the fake script runner utility
Example of using a console app instead of the runner: https://github.com/TheAngryByrd/MiniScaffold/tree/master/Content/Library/build
This isn't a paket problem, it's a fake problem.
Thanks for the info, any github issue in fake repo open to track this problem?
Do you think this problem is happening in Expecto
repository as well @baronfel ? I'm trying to install it with paket
, commands run fine but when I try to use the package errors are thrown