你能指定“nuget.exe update -self”的来源吗?

时间:2013-11-04 07:49:25

标签: nuget

从命令行运行nuget,您可以指定在安装或更新软件包时要查看的源。

-Source +: A list of package sources to search for updates.

update命令还有一个self选项:

-Self: Update the running NuGet.exe to the newest version available from the server.

然而,将这两者结合起来似乎没有任何影响:检查核素本身的更新总是https://nuget.org/api/v2/

我们希望使用nuget的自我更新功能,但同时也可以控制我们组织内部可用的版本(仅允许我们批准的版本,例如,以避免更新到包含已知的bug)。是否可以指定查找NuGet.exe更新版本的位置的来源?

1 个答案:

答案 0 :(得分:1)

目前唯一的方法是构建自己的NuGet.exe版本。

如果你在SelfUpdater class查看NuGet源代码,你会发现在检查NuGet.exe的更新版本时它默认使用主NuGet提要https://www.nuget.org/api/v2/

相关问题