Skip to content
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

Issue with NuGet package prerelease version containing "-" #841

Closed
domaslasauskas opened this issue May 27, 2015 · 7 comments
Closed

Issue with NuGet package prerelease version containing "-" #841

domaslasauskas opened this issue May 27, 2015 · 7 comments
Labels

Comments

@domaslasauskas
Copy link

Paket on Windows omits version after and including second "-" in prerelease version number. This results in issue when trying to update from 3.0.0-alpha-0008 to 3.0.0-alpha-0009 as Paket finds MyPackage.3.0.0-alpha.nupkg in cache and just restores previous version instead of new one.

This is was I get in the log when restoring package:

Downloading MyPackage 3.0.0-alpha-0008 to C:\Users\username\AppData\Local\NuGet\Cache\MyPackage.3.0.0-alpha.nupkg

Paket should maintain whole version when storing downloaded packages in cache.

@domaslasauskas
Copy link
Author

Having hyphen (actually minus) in pre-release version part is allowed according to SemVer and not forbidden anywhere in NuSpec that I could find. From SemVer:

A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-].

@domaslasauskas
Copy link
Author

Issue seems to be originating here:

var dashSplitted = version.Split('-', '+');

@domaslasauskas
Copy link
Author

As a workaround one could use paket restore --force.

@forki
Copy link
Member

forki commented May 27, 2015

No that's the bootstrapper. The issue is probably in similar code in
Paket.Core project
On May 27, 2015 4:42 PM, "Domas Lasauskas" [email protected] wrote:

Issue seems to be originating here:

var dashSplitted = version.Split('-', '+');


Reply to this email directly or view it on GitHub
#841 (comment).

@domaslasauskas
Copy link
Author

Sorry, here is the code from Paket.Core:

let dashSplitted = version.Split([|'-'; '+'|])

@forki forki added the bug label May 28, 2015
@forki forki closed this as completed in af7dc0a May 28, 2015
@forki
Copy link
Member

forki commented May 28, 2015

should be fixed. could you please retry?

@domaslasauskas
Copy link
Author

Now it works fine. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants