Skip to content

Support pre-release packages with floating versions. Version="*-*" and similar. #912

@pranavkm

Description

@pranavkm

UPDATE: final solution details

Original Issue:
Consider a project.json specification such as

{
   "A: "1.0.*"
}

If the only packages in the feed are prerelease packages such as A.1.0.0-alpha, A.1.0.1-beta, the restore fails stating it was unable to resolve package A.


[anangaur] Adding the requirement as evolved during the discussions:

As Noel, who uses NuGet packages in PackageReference based projects,

  • I would like to use floating versions that only resolves to stable versions of the package (Current behavior)
  • I would like to use floating version that can resolve to the latest version even if the latest happens to be a pre-release version.
  • I should be able to use both the braces/regex formats i.e. 1.* or [1.0.0, 2.0.0) that can include pre-release versions
  • I would like to additionally define whether I want to resolve to rc, beta, alpha or all pre-releases.

Link to spec - https://github.com/NuGet/Home/wiki/Support-pre-release-packages-with-floating-versions
Status - Implemented in version 5.6 of NuGet, 16.6 of Visual Studio and 3.1.300 of the .NET Core SDK.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions