NuGet version 1.5.20905.5 seems to have some behavior reversed regarding when it downloads.
- For a package which exists in a non-versioned folder, NuGet uninstalls and reinstalls the package if the -Version switch is excluded and the -ExcludeVersion switch is included.
-
For a package which exists in a non-versioned folder, NuGet does not install the package if the -ExcludeVersion switch is not excluded.
Examples:
Package already exists:
ls lib/NHibernateProfiler
NHibernateProfiler.nupkg content lib tools
Running nuget install does not download package to version folder because non-version folder exists
nuget Install NHibernateProfiler -o lib
Attempting to resolve dependency 'WebActivator (▒ 1.4)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (▒ 1.0.0.0)'.
'NHibernateProfiler 1.0.0.917' already installed.
Running nuget install with the -ExcludeVersion switch uninstalls and reinstalls
nuget Install NHibernateProfiler -o lib -ExcludeVersion
Successfully uninstalled 'NHibernateProfiler 1.0.0.917'.
Successfully uninstalled 'WebActivator 1.4.4'.
Successfully uninstalled 'Microsoft.Web.Infrastructure 1.0.0.0'.
Attempting to resolve dependency 'WebActivator (▒ 1.4)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (▒ 1.0.0.0)'.
Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
Successfully installed 'WebActivator 1.4.4'.
Successfully installed 'NHibernateProfiler 1.0.0.917'.