2

在我的 .nuget 中,我有一个相当旧的 NuGet.exe。我上次更新它是在 4 月初(甚至在 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.

这看起来不错,但是:

$ git status
# On branch nuget
nothing to commit, working directory clean

$ ls -l
total 12
-rw-r--r--    1 sandy    Administ      169 Mar  7  2013 NuGet.Config
-rwxr-xr-x    1 sandy    Administ    18432 Apr  9 09:06 NuGet.exe
-rw-r--r--    1 sandy    Administ     3800 Mar  7  2013 NuGet.targets

奇怪,exe没有更新。我的 PATH 中没有其他 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.

所以,这很奇怪:

  1. 我的旧 nuget.exe 声称有一个不可能的新版本。
  2. 无论我运行多少次update -self,我一直被告知它正在从 2.7.0 -> 2.7.1 升级。
  3. 实际的 nuget.exe 二进制文件没有改变。

知道发生了什么吗?我确信我可以简单地下载一个新的 nuget.exe 二进制文件并且没问题,但我想了解目前的情况。

4

2 回答 2

1

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

于 2013-10-11T16:02:43.403 回答
0

我认为您不会直接下载它。看起来这是一个错误。我注意到同样的问题。直接下载了,2.7.0版。将 .nuget\nuget.exe 重命名为其他名称并运行 update -self ,它仍然只下载 2.7.0

于 2013-09-18T19:38:30.700 回答