Manage Nuget for solution 告诉我更新包但没有提供要更新的项目

Manage Nuget for solution tells me to update package but provides no projects to update

当我在 Solution 上单击 Manage Nuget for Solution 时,我检查更新并发现我的一个包 Mr.Gestures(尽管我不确定包是否重要)需要更新。

我点击 Update,它要求我 Select Projects 但没有提供给我 select 的项目,因为它们都被禁用了(见下面的截图)。

我需要做什么才能让我的 solution 识别 Package 它是最新的?

在内置的 nuget power shell 命令行中尝试一下,nuget update 命令会在这里为您提供一些解决方案..看看

来自 link:

You could write a custom script for updating the packages like the following and execute it in the package manager console

  $list = Get-package -project {Add project name here}
  for($i=0; $i -lt $list.Length;$i ++ ) { if($list[$i].Id -ne "jquery") { Update-Package -project {Add project name here} 

所以我找到了解决这个问题的方法:

  1. 转到您的解决方案文件夹
  2. 转到 /packages 文件夹
  3. 删除过时的 pacakge 文件夹(在我的例子中 Mr.Gestures 1.2.1)
  4. 重新加载 Nuget 解决方案,包将消失