Installing and uninstalling packages with the same dependencies

Aug 12, 2011 at 12:02 AM


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 12, 2011 at 12:04 AM

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 12, 2011 at 12:14 AM

Thank you.