如何只更新具有特定 ID 的 NuGet 包? [英] How do you only update NuGet packages with certain IDs?

查看:52
本文介绍了如何只更新具有特定 ID 的 NuGet 包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据 NuGet 文档:

更新命令

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

Update packages to latest available versions. This command also updates NuGet.exe itself.

用法 nuget update

选项:

Id - 要更新的包 ID.

Id - Package ids to update.

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

This says that the ID option is the package IDs to update. How do you provide multiple ID's?

这有效:

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

...但是你如何更新 Ref2 呢?这失败了:

...but how do you also udpate Ref2? This fails:

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

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

I am trying to update a subset of packages and prevent the need for a large number of calls to NuGet.exe.

推荐答案

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

You can specify the -id option several times:

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

这篇关于如何只更新具有特定 ID 的 NuGet 包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆