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

前端 未结 11 1174
攒了一身酷
攒了一身酷 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:43

    I've found a workaround for this.

    1. Enable package restore and automatic checking (Options / Package Manager / General)
    2. Delete entire contents of the packages folder (to Recycle Bin if you're nervous!)
    3. Manage Nuget Packages For Solution
    4. Click the restore button.

    NuGet will restore only the packages used in your solution. You end up with a nice, streamlined set of packages.

提交回复
热议问题