10

根据NuGet 文档

更新命令

将软件包更新到最新的可用版本。此命令还会更新 NuGet.exe 本身。

用法nuget update <packages.config|solution>

选项:

Id - 要更新的包 ID。

这表示 ID 选项是要更新的包 ID。如何提供多个 ID?

这有效:

NuGet.exe update "MySln.sln" -RepositoryPath "MyRepoPath" -id Ref1

...但是您还如何更新 Ref2?这失败了:

NuGet.exe update "MySln.sln" -RepositoryPath "MyRepoPath" -id Ref1,Ref2

我正在尝试更新包的子集并防止需要大量调用 NuGet.exe。

4

1 回答 1

10

-id您可以多次指定该选项:

NuGet.exe update "MySln.sln" -RepositoryPath "MyRepoPath" -id Ref1 -id Ref2
于 2013-04-30T14:47:46.653 回答