New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not parse version range" where version range is generated by Paket itself #2988

Kazark opened this Issue Jan 16, 2018 · 2 comments


None yet
2 participants

Kazark commented Jan 16, 2018


We have an internal package, call it Foo, whose latest version is Its latest prerelease version is 2.0.3-prerelease3, and that general pattern is followed for all prereleases.

Given a paket.dependencies that contains the line

nuget Foo prerelease

and a paket.lock containing a prerelease version of it; and at least one other, say, FAKE:

nuget FAKE

when I run

paket update FAKE

it runs normally. But when I run

paket update --keep-major FAKE

I get:

Paket version 5.130.6
Updating FAKE in C:\bitbucket\customers\interlinebrands\NextJenPack\paket.dependencies group Main
- Runtime: 1 second
Paket failed with
-> could not parse version range "~> 2.0prerelease"

where 2.0prerelease is nowhere specified.

Repro steps

This can be reproduced with just FAKE and NUnit. For example,

  1. mkdir paketrepro ; cd paketrepro
  2. paket init
  3. paket add FAKE
  4. paket add NUnit
  5. Manually edit the paket.dependencies and add alpha after nuget NUnit, so it looks like nuget NUnit alpha. Manually edit the paket.lock and change the NUnit version to an alpha version, say 3.0.0-alpha-2.0
  6. paket restore to make sure you haven't screwed anything up
  7. paket update --keep-major FAKE <- will error with could not parse version range "~> 3.0prerelease"

Expected behavior

Able to run a paket update --keep-major like normal.

Actual behavior

Paket claims about being unable to parse a version number constraint it apparently generated itself.

Known workarounds

Update the package you want without --keep-major.


This comment has been minimized.


forki commented Jan 17, 2018

Thanks for reporting. should be fixed

@forki forki closed this Jan 17, 2018


This comment has been minimized.


Kazark commented Jan 17, 2018

@forki thanks so much. It is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment