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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.