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 and update download packages without checking the packages folder first #2618

Closed
emgarten opened this Issue Apr 20, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@emgarten
Contributor

emgarten commented Apr 20, 2016

PackageManagement does not check if a package already exists in the packages folder before retrieving it from the source. Later when it goes to install the package it finds one with the same id and version and skips using the package it downloaded.

Steps

  1. Create a solution with 2 class library projects
  2. in the first project: install-package nuget.versioning -version 3.3.0
  3. clear the global cache with nuget.exe locals -clear all
  4. Verify that nuget.versioning no longer exists in the cache
  5. Verify that nuget.versioning exists in the solution packages folder
  6. in the second project: install-package nuget.versioning -version 3.3.0
  7. Check the global packages folder

Expected

  1. The primary source will be checked for the package to make sure it exists.
  2. PackageManagement will check if the package already exists for the solution
  3. No downloads will occur since the package is already installed for the other project.

Actual

  1. The primary source is checked for the package during the gather.
  2. The package is downloaded again and added to the global cache
  3. NuGet loads the nupkg from the global cache and begins the install process
  4. Before extracting the package again NuGet detects that the package is already installed and skips using the copy from the global folder.

@emgarten emgarten changed the title from Install and update download packages instead of checking the packages folder to Install and update download packages without checking the packages folder first Apr 20, 2016

@rrelyea rrelyea added this to the 3.5 RC milestone Apr 21, 2016

@rrelyea rrelyea modified the milestones: 3.4.5, 3.5 RC Apr 25, 2016

@emgarten

This comment has been minimized.

Show comment
Hide comment
Contributor

emgarten commented May 4, 2016

@emgarten emgarten closed this May 4, 2016

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea May 4, 2016

Contributor

great. please make sure to port to 3.4.5 branch, in addition to dev.

Contributor

rrelyea commented May 4, 2016

great. please make sure to port to 3.4.5 branch, in addition to dev.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten May 20, 2016

Contributor

Ported to 3.4.5
NuGet/NuGet.Client@81e26b1

Contributor

emgarten commented May 20, 2016

Ported to 3.4.5
NuGet/NuGet.Client@81e26b1

@zhili1208 zhili1208 modified the milestones: 3.5 Beta2, 3.4.5 Jun 22, 2016

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