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.
If there's an update and the solution is opened, nuget.exe will be removed from the solution. You could automatically update nuget.exe on restore by modifying the . nuget\nuget. targets to add the above command.
Update-Package –reinstall reinstalls the same version of the original package, but installs the latest version of dependencies unless specific version constraints are provided. This allows you to update only the dependencies as required to fix an issue.
You can specify the -id
option several times:
NuGet.exe update "MySln.sln" -RepositoryPath "MyRepoPath" -id Ref1 -id Ref2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With