Installing and uninstalling packages with the same dependencies

Aug 11, 2011 at 11:02 PM


I am new to NuGet, but very interested to know everything about it. I am wondering if the following statements about NuGet are true.

1. If I have packages A and B , both have pendencies C. If I understand this correctly, when I install package A, a reference of C will also be added to my project. So when B is installed, NuGet will fingure out that C has been added already and it will not attempt to add C again.

2. When I uninstall the package A, NuGet will be smart enough to figure out that C is still being depended on by B and not remove the reference C.

I would appreciate if someone could help me understand a little bit more (or point me to a documentation source) about how NuGet handles situations like this.

Thanks very much!


Aug 11, 2011 at 11:04 PM

1. Yes in the trivial case but packages can depend on version ranges so the real answer is yes but it's more complicated than that.

2. Yes

Aug 11, 2011 at 11:14 PM

Thank you.