`nuget.exe更新-self`没有做我期望的事情

`nuget.exe更新-self`没有做我期望的事情,nuget,Nuget,在我的.nuget中,我有一个相当旧的nuget.exe。我上次更新它是在四月初(甚至在2.5发布之前)。我决定我需要更新到最新版本 因此,首先我将Visual Studio中的扩展更新为2.7.40808.167。然后,我在bash中从我的解决方案的.nuget目录运行了以下内容: $ nuget.exe update -self Checking for updates from https://www.nuget.org/api/v2/. Currently running NuGet.e

在我的.nuget中,我有一个相当旧的nuget.exe。我上次更新它是在四月初(甚至在2.5发布之前)。我决定我需要更新到最新版本

因此,首先我将Visual Studio中的扩展更新为2.7.40808.167。然后,我在bash中从我的解决方案的.nuget目录运行了以下内容:

$ nuget.exe update -self
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 2.7.0.
Updating NuGet.exe to 2.7.1.
Update successful.
嗯,这很奇怪。当前版本应该是类似于2.2的版本。哦,至少现在更新了,对吧

$ nuget
NuGet Version: 2.7.40906.75
usage: NuGet <command> [args] [options]
Type 'NuGet help <command>' for help on a specific command.
奇怪的是,exe还没有更新。我的路径中没有其他nuget.exe…让我们再次运行
update-self

$ nuget.exe update -self
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 2.7.0.
Updating NuGet.exe to 2.7.1.
Update successful.
所以,这很奇怪:

  • 我的旧nuget.exe声称有一个难以置信的新版本
  • 无论我运行了多少次
    update-self
    ,我总是被告知它正在从2.7.0->2.7.1升级
  • 实际的nuget.exe二进制文件没有更改

  • 知道发生了什么吗?我相信我可以简单地下载一个新的nuget.exe二进制文件,然后就可以了,但我想了解一下当前的情况。

    我认为直接下载不会有多大帮助。看起来像是个虫子。我注意到了同样的问题。直接下载,版本2.7.0。将.nuget\nuget.exe重命名为其他名称并运行update-self,它仍然只下载2.7.0

    很抱歉,这是一个bug。在检查当前版本时,我们读取了程序集元数据,而在发布2.7.1时,我们未能更新程序集元数据。你有最新的,它只是不知道。

    这回答了关于2.7.0->2.7.1的问题,但我仍然不明白为什么我的NuGet.exe二进制文件没有实际更改。它仍然是一些非常旧的2.x版本。
    $ nuget.exe update -self
    Checking for updates from https://www.nuget.org/api/v2/.
    Currently running NuGet.exe 2.7.0.
    Updating NuGet.exe to 2.7.1.
    Update successful.