How to list all installed NuGet packages?

How to list all locally installed NuGet packages? Is there an equivalent NuGet RPM -qa ? Inside the chocolate there is a chocolatey list -localonly , but for the life of me I cannot find the NuGet equivalent of this command.

+73
c # visual-studio nuget
Mar 12 '14 at 21:13
source share
8 answers

In the NuGet Package Management Console, enter the following command:

 Get-Package 

This will either print a list of installed packages, or if they are missing, write the following line to the console:

 PM> Get-Package No packages installed. 

See the NuGet Powershell Reference for more information.

+80
Mar 12 '14 at 21:29
source share

If you just do

 Get-Package 

he will list the packages and where they will be indicated. It will list the same packages over and over again if you reference them many times. If you want to get a clean list of all the packages installed in the solution, you can do

 Get-Package | select -Unique Id, Versions 
+41
Oct 12 '16 at 8:59
source share
 Get-Package -ProjectName "Your.Project.Name" 

Will show packages for the specified project.

See also: PowerShell Reference Package Manager Console

Note that each project will have a package.config file, which is used to track installed packages. If this is changed (especially if you change it back), projects may not automatically download the correct version of the package. In this case, pay attention to the necessary packages and make the uninstall package, followed by the install package for each.

In addition, backups are your friend!;)

+15
Apr 18 '16 at 11:25
source share

In Visual Studio,

  • Go to Project or Solution
  • right click, manage NuGet packages ...
  • on the left, you will see "Installed packages"
  • click on it and you will see a list
+11
Mar 12 '14 at 21:39
source share

How to list all installed NuGet packages?

Assuming Nuget is installed correctly

Right-click the Project node and select Manage NuGet Packages

. Right click Project node

See the list of installed packages.

See installed packages

+5
Oct. 13 '16 at 7:24
source share

In addition to all the answers above, there is also a clean list of all installed packages in the xml: packages.config format in the root folder of your VisualStudio project:

enter image description here

+5
Nov 09 '17 at 10:59 on
source share

The answer to the question "Is there a way to do this with nuget.exe? - bitbonk"

nuget -Source c: / packages list

Where c: / packages is the path to your local repository.

+2
Apr 24 '19 at 6:33
source share

The answer to the question "Is there a way to do this using nuget.exe?" - bitbonk

Based on the answer from jstar above. I used \ instead of / , which is more suitable for a Windows environment where nuget is at home. My editing of the answer was rejected, so I post my own.

nuget list -Source c:\code\packages

Where c:\code is the path to your local code repository. The packages folder is at the same level as your solution file (* .sln).

0
Aug 29 '19 at 20:13
source share



All Articles