Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I list all installed NuGet packages?

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.

like image 942
Rhodope Avatar asked Mar 12 '14 21:03

Rhodope


People also ask

Where are my NuGet packages installed?

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.

How do you check if you have NuGet installed?

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.

How do I know what packages are installed in Visual Studio?

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.

Where is NuGet installed Visual Studio?

To install NuGet packages, open Visual Studio and go to Tools -> NuGet Package Manager -> Package Manager Console.


2 Answers

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.

like image 121
Philip Allgaier Avatar answered Oct 12 '22 15:10

Philip Allgaier


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 
like image 43
bitbonk Avatar answered Oct 12 '22 15:10

bitbonk