How do I list all installed NuGet packages?

前端 未结 9 1846
旧时难觅i
旧时难觅i 2020-12-23 15:58

How does one list all locally installed NuGet packages?

Is there a NuGet equivalent of RPM -qa? Within Chocolatey there is the chocolatey list -loc

相关标签:
9条回答
  • 2020-12-23 16:07

    How do I list all installed NuGet Packages?

    Assuming that NuGet is properly installed

    Right click Project node and click Manage NuGet Packages

    See installed packages list

    0 讨论(0)
  • 2020-12-23 16:13

    Answer to "Is there a way to do this using nuget.exe?" – bitbonk

    Based on the answer from jstar above. I used \ instead of / which fits more to the Windows environment where nuget is at home. My edit of the answer was rejected so I post my own.

    nuget list -Source c:\code\packages

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

    0 讨论(0)
  • 2020-12-23 16:17

    In Visual Studio,

    • go to the Project or Solution in question
    • right click, Manage NuGet Packages...
    • on the left, you will see 'Installed Packages'
    • click on this and you will see the list
    0 讨论(0)
  • 2020-12-23 16:24
    Get-Package -ProjectName "Your.Project.Name"
    

    Will show the packages for the specified project.

    See also: Package Manager Console PowerShell Reference

    Note that each project will have a packages.config file which is used to track installed packages. If this is altered (specifically if you alter it backwards), the projects may not automatically download the correct package version. In that case, make a note of the packages required and do a uninstall-package, followed by a install-package for each.

    Also, backups are your friend! ;)

    0 讨论(0)
  • 2020-12-23 16:28

    In addition to all of the given answers, there is also a clean listing in XML format of all installed packages in your Visual Studio project root folder: packages.config:

    0 讨论(0)
  • 2020-12-23 16:29

    Answer to "Is there a way to do this using nuget.exe? – bitbonk":

    nuget list -Source C:/packages
    

    Where C:/packages is a path to your local repository.

    0 讨论(0)
提交回复
热议问题