How does one list all locally installed NuGet packages?
Is there a NuGet equivalent of RPM -qa
? Within Chocolatey there is the chocolatey list -localonly
, but for the life of me I cannot find the NuGet equivalent of that command.
The global-packages folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder. When using the packages.
In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.
You can get a list of installed extensions and packages from the Help - About Microsoft Visual Studio dialog. The Copy Info button copies this list as text to the clipboard.
To install NuGet packages, open Visual Studio and go to Tools -> NuGet Package Manager -> Package Manager Console.
In the NuGet Package Manager Console, enter the following command:
Get-Package | Format-Table -AutoSize
This will either print out a list of installed packages, or if none are present write the following line to the console:
PM> Get-Package No packages installed.
For more details, have a look at the NuGet PowerShell Reference.
If you just do
Get-Package
it will list the packages and where they are referenced. It will list the same packages over and over again if you have them referenced many times. If you want to get a clean list of all packages installed in the solution you can do
Get-Package | select -Unique Id, Versions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With