Nuget.exe Command-Line Update

Topics: Ecosystem
Apr 15, 2013 at 3:06 PM
We're having an issue with utilizing the update action on the command-line version of nuget.exe, and I'm curious to see whether our hypothesis is correct (without digging through the code).

Through our CI system (Jenkins), we always pull the latest nuget packages when a build is triggered via a pre-build step of nuget.exe update

Once this is complete, we have a custom utility that removes unused packages from the packages folder (just clean up)

Here comes the interesting part.

The next time a build is triggered - we issue an hg update --clean. This reverts the state of the packages.config files to their previous state, but since the package folder is no longer there (remember, we remove them after an update), no updates can be found.

Our hypothesis is that the update command is actually scanning the packages folder for a unique list of packages, and then figuring out which projects it is referenced in.

If this is true, is there a reason that it scans the folder instead of building a unique list of installed packages through the packages.config files? I sense there might be a performance hit by doing it through the config files versus the folders, but I just want to understand :)