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

paket pack adds wrong prerelease dependency #2024

Closed
tpluscode opened this issue Nov 17, 2016 · 6 comments
Closed

paket pack adds wrong prerelease dependency #2024

tpluscode opened this issue Nov 17, 2016 · 6 comments

Comments

@tpluscode
Copy link
Contributor

Description

When paket.lock includes a prerelease package paket pack command adds wrong dependency version to the .nupkg file

Repro steps

  1. Install a prerelease package. Sample entry paket.dependencies:
nuget Nancy prerelease
  1. Create a minimal paket.template
type project
version 0.1
authors tpluscode
  1. Build Release
  2. Create package:
paket pack output nugets

Repro here

Expected behavior

The reference should be >= 2.0.0-barneyrubble

Actual behavior

Actual reference in .nupkg is listed as <dependency id="Nancy" version="0.0.0-prerelease" />

Known workarounds

Adding these lines to paket.template solves the issue

dependencies
  Nancy >= LOCKEDVERSION
@forki
Copy link
Member

forki commented Nov 18, 2016

If you remove the prerelease in the deps file you will get:

  <dependency id="Nancy" />

which basically means > 0 (but not prerelease).

0.0.0-prerelease is actually ny design. What's wrong with it?

@tpluscode
Copy link
Contributor Author

So 0.0.0-prerelease will install any latest prerelease version, be it 2.0 or 3.0 or whatever?

@forki
Copy link
Member

forki commented Nov 18, 2016

that's what I hope. yes

@tpluscode
Copy link
Contributor Author

I don't think it's good design. It works when installed with Paket but most consumers will use NuGet that comes with VS.

With NuGet Package Manager the only way to install the desired version 2.0.0-prerelease is use the Dependency behavior to Highest. Unfortunately that installs prerelease versions of all transitive packages. Selecting Highest Patch or Highest Minor installs 0.4 and 0.23 respectively.

@forki
Copy link
Member

forki commented Nov 18, 2016

ok. but that's just Nuget being dumb.

@forki
Copy link
Member

forki commented Nov 18, 2016

but that said: I thing we could change it to >= LOCKEDVERSION

for prereleases this would make sense

@forki forki closed this as completed in 004e83e Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants