Feb 8, 2013 at 11:23 AM
Edited Feb 8, 2013 at 11:24 AM
I would name it -Safe, but -Safe already means something else for Update-Package...
Currently, during installation, Install-Package resolve dependencies by looking:
- in the repository of installed package
- in the repository of online package.
[AFAIU the resolution is done using the rule "lowest major.minor version matching the constraint, highest patch version available"]
Nuget then picks the highest version between the two.
Hence the proposed name "-PreferInstalledDependencies", meaning that nuget would prefer the installed version even if a newer patch version is available online.
Other names I could came up with:
[Those two might sound strange in Update-Package]
-Safer / -Safest
Another option would be to consider changing the meaning of -Safe for Update-Package.
At the moment, it means:
- Update the package to it's latest patch version (within it's current major.minor), and update its dependencies accordingly.
- if -Version is not specified, keep the same behavior
- if -Version is specified, update the package the specified version, and updates its dependencies only if strictly necessary.
So many options, who is going to make the call? :)
I think I like "-Safe" the best, but it's a harder decision to make because it changes existing behavior.