How do I delete NuGet packages that are not referenced by any project in my solution?

前端 未结 11 1183
攒了一身酷
攒了一身酷 2021-01-30 01:53

Somehow during the upgrade to VS2012 and .NET 4.5, I\'ve managed to get NuGet confused. There are packages that appear in the package manager (and the packages folder) that I c

11条回答
  •  我在风中等你
    2021-01-30 02:42

    Solution 1

    Use the powershell pipeline to get packages and remove in single statement like this

    Get-Package | Uninstall-Package
    

    Solution 2

    if you want to uninstall selected packages follow these steps

    1. Use GetPackages to get the list of packages
    2. Download Nimble text software
    3. Copy the output of GetPackages in NimbleText(For each row in the list window)
    4. Set Column Seperator to ( if required
    5. Type Uninstall-Package $0 (Substitute using pattern window)
    6. Copy the results and paste them in Package Manage Console

    That be all folks.

提交回复
热议问题