Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"Upgrade vailable" filter shows upgrades that violate the version constraint #1094
Hello. I'm using Visual Studio 2015 Prof RTM. When I select "Manage NuGet Packages" on my project and select the "Upgrade available" filter I see updates to my packages that violate the version constraint.
Specifically I have this entry in my packages.config:
NuGet shows me an upgrade is available to version 5.2.3.
The expected behavior would be to only show upgrades to versions within my specified constraint.
This clearly says I want all updates until version 5. The NuGet manager in Visual Studio shows that there is an update to version 5 available. This violates the specified allowedVersions constraint. Trying to update obviously fails, as this project is only .NET 4.0 and MVC5 does not support .NET 4.0 anymore.
The PoweShell command "Update-Package" recognizes this constraint correctly. It updates to all packages less than version 5.
Here's an image of the issue:
I just noticed another bug, but I gotta see if there's already an issue. If NuGet found an update and installed it, it will replace my entry in the packages.config with the new version. While doing this it removes the allowedVersions constraint. The expected behavior would be to take this over.
changed the title from
[NuGet.VisualStudioExtension] "Upgrade vailable" filter shows upgrades that violate the version constraint
"Upgrade vailable" filter shows upgrades that violate the version constraint
Aug 6, 2015
After discussing with Fei, I am assigning this bug to him. Currently while in the dialog we don't read packages.config and apply the constraints in the values show in the dropdown. We always return all listed versions available.Only when we invoke an action version constraints are applied. As Fei is working on redesigning the dialog he is going to add code to read packages.config while populating the dropdown.
Also note this comment from a duplicate issue by @Advarius:
Visual Studio 2015 is used. I update package with allowedVersions="[1.0,1.1)" attribute from NuGet Package Manager. Current version of package is 1.0.72, available versions are 1.0.73 and 1.1.1.
Firstly, I can see that version "1.1.1" is available for update, which is not satisfy condition. But moreover, if I use Dependency behavior: "Ignore dependencies", nuget will update package to this version despite of constraint without any message.
I have this problem as well. AFAIK I have latest Nuget installed (22.214.171.1244), but with the following packages entry I see upgrades offered both at a project and solution level: