Dla każdego z systemem Nuget v3 lub wyższej (tj VS2015), jeśli uruchomić polecenie Get-Package
, zostanie podany komunikat:
Ta kombinacja/Parametr polecenia jest przestarzała i będzie usunięte w następnej wersji. Rozważ użycie nowego polecenia, które go zastąpi: "Znajdź-pakiet [-Id]".
Dokumentacja dla dość dobrze wyjaśnia nową komendę i widać, że nie ma już parametru -list
. Niestety wydaje się, że ani ten nowy, ani stary nie da ci zależności. Można zobaczyć wszystkie właściwości zwrócony tak:
Find-Package | Get-Member
Który powróci:
TypeName: NuGet.PackageManagement.PowerShellCmdlets.PowerShellRemotePackage
Name 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.... snip
Description Property string Description {get;set;}
Id Property string Id {get;set;}
LicenseUrl Property string LicenseUrl {get;set;}
Version Property NuGet.SemanticVer.... snip
Versions Property System.Collections.... snip
Nie wydaje się, że być zależne na liście w VS2015 –
To nie wydaje się być PowerShell, wygląda to jak Menedżer pakietów w Visual Studio –
@MichaelEakins Okno menedżera pakietów NuGet w Visual Studio jest zaimplementowane jako host PowerShell, ergo to * to * PowerShell. Wiem o tym, bo napisałem większość. – x0n