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

Install-Package should filter unlisted packages when no version is given #5069

Closed
skofman1 opened this issue Apr 19, 2017 · 12 comments
Closed
Labels
Functionality:Update The update package feature/command/experience Priority:2 Issues for the current backlog. RegressionFromPreviousRTM A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3 Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug
Milestone

Comments

@skofman1
Copy link
Contributor

@jsakamoto commented on Wed Apr 19 2017

What you were trying to do.

Update the NuGet package "Selenium.WebDriver.MicrosoftWebDriver" from version v.10.0.14393.1 to latest version.

What you expected to happen.

The version of the NuGet package "Selenium.WebDriver.MicrosoftWebDriver" update to v.10.0.15063.0.

What actually happened.

The version of the NuGet package "Selenium.WebDriver.MicrosoftWebDriver" updated to v.10.1.14393.0.

That version is unlisted package version.
See also: https://www.nuget.org/packages/Selenium.WebDriver.MicrosoftWebDriver/10.1.14393

Steps to reproduce the problem.

  1. Create or open any .NET project with Visual Studio 2017.
  2. Execute "Install-Package Selenium.WebDriver.MicrosoftWebDriver" command at Package Manager Console.
  3. After it, the correct latest version "10.0.15063" was installed. (This is correct behavior)
  4. Next step, execute "Update-Package Selenium.WebDriver.MicrosoftWebDriver" command.
  5. Then, the command update the package to UNLISTED version "10.1.14393" !

Appendix Information

I guess, this problem happens due to the JSON response from api.nuget.org.

The JSON reponse contains "upper" proprty, but it looks like include unlisted package versions.

image

Is it by design and it should not change? or should fix it?


@skofman1 commented on Wed Apr 19 2017

@joelverhagen , @emgarten , is this a client or server issue?


@emgarten commented on Wed Apr 19 2017

Looks like a client issue if the unlisted package is being installed. The upper and lower bounds are correct.


@joelverhagen commented on Wed Apr 19 2017

I confirmed this behavior in NuGet 4.2.0.2451 with a packages.config project. A PackageReference project does not reproduce the problem. The issue occurs for both V2 and V3 NuGet.org source URL.

As @emgarten, this seems to be a client issue.

@emgarten emgarten changed the title In the JSON response from api.nuget.org, "upper" version info property SHOULD NOT include the version of unlisted package, or not? Install-Package should filter unlisted packages when no version is given Apr 19, 2017
@wli3
Copy link

wli3 commented Aug 23, 2017

Hi,
dotnet CLI got an opposite issue

https://github.com/dotnet/cli/issues/7492

Which should be the designed behavior? Latest unlisted of listed?

@richardszalay
Copy link

FYI, the CLI issue is the same issue. Perhaps you meant "equivalent", instead of "opposite"?

@richardszalay
Copy link

I'd say this is definitely a bug, and not designed behavior. The documentation for unlisting a package even says:

Unlisting a version can help you prevent new usage of it without breaking dependent projects and builds

And having it install by default does quite the opposite of preventing new usage.

@jainaashish jainaashish added Functionality:Update The update package feature/command/experience RegressionFromPreviousRTM A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3 Type:Bug labels Aug 24, 2017
@jainaashish jainaashish added this to the 15.4 milestone Aug 24, 2017
@jainaashish jainaashish added the Priority:2 Issues for the current backlog. label Aug 24, 2017
@nkolev92 nkolev92 assigned nkolev92 and unassigned nkolev92 Sep 8, 2017
@mishra14 mishra14 modified the milestones: 15.4, Backlog Oct 18, 2017
@tokyo0709
Copy link

@karann-msft
Copy link
Contributor

cc: @anangaur

@jainaashish
Copy link
Contributor

dupe of #4553

@jainaashish jainaashish added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Apr 27, 2018
@jainaashish jainaashish modified the milestones: Backlog, 4.8 Apr 27, 2018
@matkoch
Copy link
Contributor

matkoch commented Oct 18, 2019

5.3.0 is still downloading unlisted versions?

@jainaashish please reopen

@matkoch
Copy link
Contributor

matkoch commented Oct 18, 2019

@emgarten ^^^^

@nkolev92
Copy link
Member

@matkoch If you think there's a regression please open a new issue since this is not actively monitored.

@matkoch
Copy link
Contributor

matkoch commented Oct 19, 2019

@nkolev92 there already is another one at #7466

I just can't understand how this is not addressed for such a long time? Sorry, but I'm really disappointed.

@mwwhited
Copy link

5 years later and this is still and issue. I should really sell my MS stock.

@nkolev92
Copy link
Member

@mwwhited
This issue is closed. The linked issue for PMC, #4553, was fixed in 2018 NuGet/NuGet.Client#2270.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Update The update package feature/command/experience Priority:2 Issues for the current backlog. RegressionFromPreviousRTM A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3 Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug
Projects
None yet
Development

No branches or pull requests

10 participants