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

nuget.exe install incorrectly disables caching #5737

Closed
emgarten opened this issue Aug 10, 2017 · 0 comments · Fixed by NuGet/NuGet.Client#1634
Closed

nuget.exe install incorrectly disables caching #5737

emgarten opened this issue Aug 10, 2017 · 0 comments · Fixed by NuGet/NuGet.Client#1634
Assignees
Labels
Functionality:Install The install command in VS/nuget.exe Product:NuGet.exe NuGet.exe Type:Bug
Milestone

Comments

@emgarten
Copy link
Member

nuget.exe install disables caching when no version is provided.

In 2.x this changed the install by removing the machine cache from the sources list (by default the cache is a source for nuget.exe packages.config scenarios). The hash would be verified but downloading the package again would be skipped.

In 3.x/4.x the cache is completely ignored and the package is re-downloaded each time using DirectDownload.

The install command code is the same between 2.x and 3.x/4.x, but behind the scenes caching has changed in 3.x/4.x.

This behavior seems like a very poor user experience, it should be possible to run install and still use the normal cache.

https://github.com/NuGet/NuGet.Client/blob/6f8d529312187fa1b6734da8d4ed9dc3442b916c/src/NuGet.Clients/NuGet.CommandLine/Commands/InstallCommand.cs#L247-L249

@emgarten emgarten added this to the 4.4 milestone Aug 10, 2017
@emgarten emgarten self-assigned this Aug 10, 2017
@emgarten emgarten changed the title nuget.exe install incorrect disables caching nuget.exe install incorrectly disables caching Aug 10, 2017
@emgarten emgarten mentioned this issue Aug 10, 2017
9 tasks
@emgarten emgarten added the Functionality:Install The install command in VS/nuget.exe label Aug 11, 2017
emgarten added a commit to NuGet/NuGet.Client that referenced this issue Aug 12, 2017
* Allow updating packages when -ExcludeVersion is used
* Improved detection of already installed packages when -ExcludeVersion is used
* Adding -Framework switch to allow setting the target framework used when resolving dependencies.
* Remove NU1000 code from packages.config restore errors.
* Avoid unneeded downloads when a version is not given and the package is cached.
* Disable parallel for mono
* Display errors and return a non-zero exit when install on packages.config fails
* Remove old files during upgrades with -ExcludeVersion

Fixes NuGet/Home#5743
Fixes NuGet/Home#5737
Fixes NuGet/Home#5736
Fixes NuGet/Home#5741
Fixes NuGet/Home#5017
Fixes NuGet/Home#3957
Fixes NuGet/Home#2405
emgarten added a commit to NuGet/NuGet.Client that referenced this issue Aug 12, 2017
* Allow updating packages when -ExcludeVersion is used
* Improved detection of already installed packages when -ExcludeVersion is used
* Adding -Framework switch to allow setting the target framework used when resolving dependencies.
* Remove NU1000 code from packages.config restore errors.
* Avoid unneeded downloads when a version is not given and the package is cached.
* Disable parallel for mono
* Display errors and return a non-zero exit when install on packages.config fails
* Remove old files during upgrades with -ExcludeVersion

Fixes NuGet/Home#5743
Fixes NuGet/Home#5737
Fixes NuGet/Home#5736
Fixes NuGet/Home#5741
Fixes NuGet/Home#5017
Fixes NuGet/Home#3957
Fixes NuGet/Home#2405
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Install The install command in VS/nuget.exe Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant