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

Installing with package save mode "nuspec" always reinstalls #2402

Closed
joelverhagen opened this issue Mar 25, 2016 · 0 comments · Fixed by NuGet/NuGet.Client#4148
Closed

Installing with package save mode "nuspec" always reinstalls #2402

joelverhagen opened this issue Mar 25, 2016 · 0 comments · Fixed by NuGet/NuGet.Client#4148
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug
Milestone

Comments

@joelverhagen
Copy link
Member

Steps

nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nuspec
nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nuspec

-or-

nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg -OutputDirectory packages
nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg -OutputDirectory packages

Expected

The package should only be installed once.

The following steps act as expected:

nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg
nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg
> nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg
Feeds used:
  C:\Users\jver\AppData\Local\NuGet\Cache
  C:\Users\jver\.nuget\packages\
  https://api.nuget.org/v3/index.json

Attempting to gather dependency information for package 'Newtonsoft.Json.8.0.3' with respect to project 'C:\trash\2016-03-25\nupkgRepro', targeting 'Any,Version=v0.0'
Attempting to resolve dependencies for package 'Newtonsoft.Json.8.0.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Newtonsoft.Json.8.0.3'
Resolved actions to install package 'Newtonsoft.Json.8.0.3'
Adding package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nupkgRepro'
Added package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nupkgRepro'
Successfully installed 'Newtonsoft.Json 8.0.3' to C:\trash\2016-03-25\nupkgRepro

> nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nupkg
Feeds used:
  C:\Users\jver\AppData\Local\NuGet\Cache
  C:\Users\jver\.nuget\packages\
  https://api.nuget.org/v3/index.json

Package "Newtonsoft.Json.8.0.3" is already installed.

Actual

The package is installed twice. The second install overwrite all of the files on disk, but is effectively a no-op.

> nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nuspec
Feeds used:
  C:\Users\jver\AppData\Local\NuGet\Cache
  C:\Users\jver\.nuget\packages\
  https://api.nuget.org/v3/index.json

Attempting to gather dependency information for package 'Newtonsoft.Json.8.0.3' with respect to project 'C:\trash\2016-03-25\nuspecRepro', targeting 'Any,Version=v0.0'
Attempting to resolve dependencies for package 'Newtonsoft.Json.8.0.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Newtonsoft.Json.8.0.3'
Resolved actions to install package 'Newtonsoft.Json.8.0.3'
Adding package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nuspecRepro'
Added package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nuspecRepro'
Successfully installed 'Newtonsoft.Json 8.0.3' to C:\trash\2016-03-25\nuspecRepro

> nuget.exe install Newtonsoft.Json -Version 8.0.3 -PackageSaveMode nuspec
Feeds used:
  C:\Users\jver\AppData\Local\NuGet\Cache
  C:\Users\jver\.nuget\packages\
  https://api.nuget.org/v3/index.json

Attempting to gather dependency information for package 'Newtonsoft.Json.8.0.3' with respect to project 'C:\trash\2016-03-25\nuspecRepro', targeting 'Any,Version=v0.0'
Attempting to resolve dependencies for package 'Newtonsoft.Json.8.0.3' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Newtonsoft.Json.8.0.3'
Resolved actions to install package 'Newtonsoft.Json.8.0.3'
Adding package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nuspecRepro'
Added package 'Newtonsoft.Json.8.0.3' to folder 'C:\trash\2016-03-25\nuspecRepro'
Successfully installed 'Newtonsoft.Json 8.0.3' to C:\trash\2016-03-25\nuspecRepro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants