I'm troubleshooting some issues with specific versions of nuget and msbuild, hence need for downgrading of nuget versions:
Nuget can be updated to latest version with this command:
nuget update -self
However installing a specific version of nuget seems to be unsupported, this still install the latest version of nuget:
nuget update -self -Version 4.6.2
And this fails with nuget not found error:
nuget install nuget -Version 4.6.2
https://docs.microsoft.com/en-us/nuget/tools/cli-ref-install
https://docs.microsoft.com/en-us/nuget/tools/cli-ref-update
EDIT:
Looking at nuget source code the developers made an assumption that update should always happen to the latest version:
// Check to see if an update is needed
if (package == null || version >= package.Version)
Very sad decision, Microsoft! Hence submitted a PR and it was rejected: