Install-Package ignoring installed packages versionspec?

Jul 14, 2011 at 1:17 PM

I have Application, PackageA and Rx-Main


Application has Rx-Main 1.0.10621 installed with an exact version requirement
<package id="Rx-Main" version="[1.0.10621]" />


PackageA has Rx-Main 1.0.10605 as an exact version dependency

When I install PackageA into Application it installs the older RX rather than erroring?
Am I doing or expecting anything wrong?



Jul 14, 2011 at 10:48 PM

That doesn't sound right. Can you give more complete steps that describe how you got into that state? e.g. did you manually edit your packages.config?

Jul 14, 2011 at 11:07 PM

Do you mean to use the allowedVersions attribute?

Jul 15, 2011 at 10:59 AM

Ok, I got confused.
I was setting the "allowed version" in the Version attribute for both packages.config and PackageA.Nuspec
packages.config requires the allowedVersion attribute to specify a version spec.

Am I meant to be doing this via some other method? i.e. not editing the files?



Jul 15, 2011 at 4:50 PM

Currently, you have to edit the packages.config by hand to set the allowedVersion attribute. We have a bug that’ll let you do it at install time:

The idea would be you could do this:

Install-Package SomePackage –version [1.0.0, 2.0.0)

Suppose at the time, SomePackage 1.1 is the highest version in the feed. That would install SomePackage 1.1 but lock it so that upgrades will only take you as high as 1.99999… but never up to 2.*.