Distinction between direct dependency and transitive dependency

Topics: General
Jul 11, 2012 at 9:17 AM
Edited Jul 11, 2012 at 9:18 AM

I am trying to generate nuget packages with a .csproj. Everything goes fine until a package is both direct and transitive dependency. Then this package is removed from the dependecies, with all informations, especially  the allowed revisions. I think it can lead to issues. Let assume this versionning convention : the major revision number is incremented if the new version breaks back compatibility.

So, to ensure having a compatible package, every package will have restriction like [2,3). Now, we have three packages A,B,C.

First :

* C is in version 1.6

* B is in version 2.5 and depend of C [1,2)

* A is in version 0.3 and depend of B[2.3) and C[1,2)

For now everything is fine, because A and B have the same version restrictions for C

Then, C is released in 2.0 (with  back compatibility broken). B is released to be compatible with C, but doesn't break its own interface. So it is only a minor version 2.6, compatible with C[1.5,2) (The breaking was suppression of deprecieted interfaces introduce in 1.5)

While A is not updated and, says nuget, A does not depent directly of C, any package of A does not contain the C dependency, runing an update will break every project using A. C will be chosen in version 2.0 whereas it should be 1.6.


It is one of the issue of considering dependency as a set instead of a directed graph, as does many packet manager, but i am sure there is others, like what it is done during packet uninstallation.

So, it is in roadmap to consider make a distinction between direct and transitive dependancy ?


Jul 11, 2012 at 3:35 PM

I too would like this to be a high priority. Here is my take on this issue: http://nuget.codeplex.com/discussions/353850

Jul 11, 2012 at 5:13 PM

@corum: When you say you run update, which package do you update?

Jul 12, 2012 at 7:53 AM

@dotnetjunky: Package C for instance.

Dec 10, 2013 at 9:21 AM
I think this should be handled by this workitem: https://nuget.codeplex.com/workitem/2271