infojolt
infojolt

Reputation: 5418

How do you only update NuGet packages with certain IDs?

According to the NuGet documentation:

Update Command

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

Usage nuget update <packages.config|solution>

Options:

Id - Package ids to update.

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

This works:

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

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

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

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

Upvotes: 10

Views: 2430

Answers (1)

Julian
Julian

Reputation: 20324

You can specify the -id option several times:

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

Upvotes: 12

Related Questions