Unsliced Unsliced - 4 months ago 26
PowerShell Question

Displaying a NuGet package's dependencies

When you show the Manage NuGet Packages dialog box, it will show the available packages with a lot more information than is apparently available than from the powershell.

In particular, is there a way from the powershell which will list the available packages - or just a single specific package - with the packages they are dependent on, ideally with their target version (ranges)?

x0n x0n
Answer

Yes, there is.

# shows all available packages
PM> get-package -list

 # get single package info
PM> get-package -list solrnet.nhibernate

# view dependencies
PM> get-package -list solrnet.nhibernate | select dependencies
NHibernate:[2.1.2.4000]|CommonServiceLocator:[1.0]|SolrNet:[0.3.1]