NuGet pack excludes dependency which is also a transitive dependency

Apr 27, 2012 at 10:16 PM
Edited Apr 27, 2012 at 10:35 PM

I'm using NuGet pack to create a package from a Project. Suppose my project A, depends on B and C. Project B also depends on C. Package A will have B listed as a dependency but not C. Suppose some time later a new version of B is released that no longer depends on C. New users of A won't get C and will break.

Of course, we can't tell from looking at project A's packages.config which packages we have a direct dependency to and which ones are included because they are transitive dependencies.

Maybe this coulde be resolved by adding a flag to each package in packages.config to indicate if it is a transitive dependency. Then if I were to install a package which was already a transitive dependency it would just clear this flag. And If I uninstall a package we could search all other packages for this package and if found keep the package reference with the transitive flag set.

The Package Visualizer also suffers from this problem, it omits direct links when a transitive dependency exists.

A workaround is to manually include the missing dependencies in a nuspec file. 

May 15, 2012 at 11:01 PM

Here is a bug for a different problem but related to the fact that NuGet doesn't distinguish between direct dependencies and transitive dependencies: http://nuget.codeplex.com/workitem/2203

Jul 11, 2012 at 4:33 PM

Here is similar problem: http://nuget.codeplex.com/discussions/362781

Jul 11, 2012 at 5:06 PM

I  cannot  allowed to install NuGet on your desktop. Any idea how to fix this problem?

 

World of Warcraft Guides Review