May 27, 2011 at 2:20 PM
Edited May 27, 2011 at 2:41 PM
Right now as it is, install packages from packages.config means "restore the packages folder for everything I have installed in my project" and nothing else.
Can you include some examples of packages.config as written by the VS plugin where allowedVersions is included?
(Thinking out loud here...) As far as I can tell from the sources now, you'll only have two options with allowedVersions:
<package id="Foo" allowedVersions="(,2.0)" />
<package id="Foo" version="1.5" allowedVersions="(,2.0)" />
In the latter case, the InstallCommand could do what I coded it to do if both -Version and -AllowedVersions switches are provided, which is to ignore AllowedVersions. But then if it ignores AllowedVersions, why have it there? It'd be more mature to
attempt to find the exact version first then use AllowedVersions as a fall-back, though I'm not sure that'd be a very common use case, "I really want 1.5 and only 1.5, unless it's not there, then I'm okay with whatever version you find up to version 2.0."
In the former case, there'd be nothing else to do.
So ... I guess the desire then is to store allowedVersions for a different command? Install means use version, Upgrade means use allowedVersions and write the new version to the version attribute? Should the command line go in a similar direction? Or is
there another direction here?