You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing a package with a dependent version that also has a less restrictive dependency on the same package fails when Dependency Version Behavior Highest
#1839
Closed
ferventcoder opened this issue
Dec 16, 2015
· 3 comments
Attention: I have not yet verified this with NuGet v3 (working on that unless someone beats me to it).
Update: This works properly in v3 and so it has been closed as already fixed.
Original Request
NuGet doesn't seem to be able to handle the scenario where a package has a dependency constraint on a package version and another dependency has a similar, but looser constraint on a package version.
Given a top level package that has two exact version dependencies at [1.0.0]. One of the child packages also depends on the same other package, but this time the dependency is a little looser (but still valid) at [1.0.0, 3). This is valid for both dependencies as both contain inclusive versions.
Nothing is installed, so it is expected that NuGet would resolve version 1.0.0 of that package because that's where the resolution between the two version constraints for that package would land. It doesn't appear to.
It fails with the well-known Already referencing a newer version of 'x'.
In Visual Studio NuGet Package Manager Settings, add that local folder as a source.
In the Visual Studio Package Manager Console, select that source.
In the Visual Studio Package Manager Console, run install-package toplevelhasexactversiondependency -DependencyVersion Highest.
Watch the output.
Expected Results
It should work properly and version 1.0.0 of three packages should be installed.
Actual Results
It fails in VS2013 which looks like it includes up to 2.8.7 in the latest available extension. I'm curious if it also fails in VS2015 (which includes 3.x).
If it fails in the latest version, it feels like a bug considering that the dependency walker should resolve this automatically.
Details
The zip contains four packages. You can recreate these yourself if you need to.
Short and long of this is that I tried to get NuGet.exe to respect the dependency behavior attribute in NuGet.config and it doesn't (unless it changed to a different name). It didn't in any of the older versions and it still doesn't in v3.3.0. chocolatey/choco#507 (comment)
ferventcoder
changed the title
Installing a package with a dependent version that also has a less restrictive dependency on the same package it fails with Dependency Version Behavior Highest
Installing a package with a dependent version that also has a less restrictive dependency on the same package fails when Dependency Version Behavior Highest
Dec 16, 2015
Attention: I have not yet verified this with NuGet v3 (working on that unless someone beats me to it).Update: This works properly in v3 and so it has been closed as already fixed.
Original Request
NuGet doesn't seem to be able to handle the scenario where a package has a dependency constraint on a package version and another dependency has a similar, but looser constraint on a package version.
Given a top level package that has two exact version dependencies at
[1.0.0]
. One of the child packages also depends on the same other package, but this time the dependency is a little looser (but still valid) at[1.0.0, 3)
. This is valid for both dependencies as both contain inclusive versions.Nothing is installed, so it is expected that NuGet would resolve version
1.0.0
of that package because that's where the resolution between the two version constraints for that package would land. It doesn't appear to.It fails with the well-known
Already referencing a newer version of 'x'.
Reproduction
Here is your complete reproduction.
install-package toplevelhasexactversiondependency -DependencyVersion Highest
.Expected Results
It should work properly and version
1.0.0
of three packages should be installed.Actual Results
It fails in VS2013 which looks like it includes up to 2.8.7 in the latest available extension. I'm curious if it also fails in VS2015 (which includes 3.x).
If it fails in the latest version, it feels like a bug considering that the dependency walker should resolve this automatically.
Details
The zip contains four packages. You can recreate these yourself if you need to.
toplevelhasexactversiondependency.nuspec:
childdependencywithlooserversiondependency.nuspec:
isexactversiondependency.nuspec:
Note: add a file in the tools folder so it will build.
v1.0.0
v1.1.0
The text was updated successfully, but these errors were encountered: