0

Installing Packages from Nuget are one of the most efficient ways for developing C# applications. It's a huge time saver.

However, can a Package I install from Nuget also contain a package(s) installed within it? If so how can I view sub-packages within a Package?

1 Answers1

1

Short answer is yes, you can use packages inside of other packages. They are called dependencies, and the other packages will get installed along side the first package. Here's the Microsoft Documentation on nuget package dependency.

EDIT: Here's how to view/manage these in visual studio. You can view all other packages in the dependencies section shown below. This package depends on System.ValueTuple with a version of 4.5.0 or greater. enter image description here

Wellerman
  • 846
  • 4
  • 14
  • Is there any way to see the packages installed within a package in Visual Studio? –  Sep 28 '21 at 05:33
  • https://stackoverflow.com/questions/9037745/displaying-a-nuget-packages-dependencies – Wellerman Sep 28 '21 at 05:34
  • I'm not familiar with using the command prompt for accessing or viewing files. Is there any way to view what is in a package in the Visual Studio IDE? –  Sep 28 '21 at 05:47
  • I updated the answer with that information. – Wellerman Sep 28 '21 at 05:48
  • Just as a confirmation: "Dependencies" will always list the package(s) within a package? –  Sep 28 '21 at 06:19
  • 1
    Yes, it will always list any packages needed to run a given package. – Wellerman Sep 28 '21 at 13:23