Displaying a NuGet package's dependencies
Yes, there is.
# shows all available packagesPM> get-package -list # get single package infoPM> get-package -list solrnet.nhibernate# view dependenciesPM> get-package -list solrnet.nhibernate | select dependenciesNHibernate:[2.1.2.4000]|CommonServiceLocator:[1.0]|SolrNet:[0.3.1]
For anyone running Nuget v3 or higher (i.e. VS2015), if you run the command Get-Package
, you will be given this message:
This Command/Parameter combination has been deprecated and will be removed in the next release. Please consider using the new command that replaces it: 'Find-Package [-Id]'.
The documentation for Find-Package
explains the new command rather well, and you can see there is no longer a -list
parameter. Unfortunately it seems neither this new nor the old one will give you the dependencies. You can see all the properties returned like this:
Find-Package | Get-Member
Which will return:
TypeName: NuGet.PackageManagement.PowerShellCmdlets.PowerShellRemotePackageName MemberType Definition---- ---------- ----------Equals Method bool Equals(System.Object obj)GetHashCode Method int GetHashCode()GetType Method type GetType()ToString Method string ToString()AllVersions Property bool AllVersions {get;set;}AsyncLazyVersions Property Microsoft.VisualStudio.... snipDescription Property string Description {get;set;}Id Property string Id {get;set;}LicenseUrl Property string LicenseUrl {get;set;}Version Property NuGet.SemanticVer.... snipVersions Property System.Collections.... snip
I used:
Find-Package <PackageName> -IncludeDependencies