Reputation: 12305
How can I upgrade a NuGet package to a specific version.
This is similar to Download old version of package with nuget, except I already have a version of the given nuget package installed.
I can't update to the latest version, so I want to update to a specific one.
Do I need to uninstall and than re-install or can I upgrade in one step?
Upvotes: 4
Views: 5044
Reputation:
So I think you need to run the Update-Package command by setting the Version
flag.
For example:
Update-Package Newtonsoft.Json -Version 6.0.4
Here's the full command from the documentation for more reference:
Update-Package [-Id] [-IgnoreDependencies] [-ProjectName ] [-Version ] [-Source ] [-Safe] [-IncludePrerelease] [-Reinstall] [-FileConflictAction] [-WhatIf]
http://docs.nuget.org/docs/reference/package-manager-console-powershell-reference
Upvotes: 6