Reputation: 5009
Running nuget update -self
from VS 2017 Developer Command Prompt I encountered the following error. How do I make nuget upgrade itself to the latest version?
Checking for updates from https://nuget.org/api/v2/.
Currently running NuGet.exe 2.0.30619.9000.
Updating NuGet.exe to 4.4.1.
The element 'metadata' in namespace 'http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd' has invalid child element 'developmentDependency' in namespace 'http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd'. List of possible elements expected: 'title, tags, summary, licenseUrl, releaseNotes, copyright, description, projectUrl, frameworkAssemblies, language, references, dependencies, iconUrl' in namespace 'http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd'.
Upvotes: 0
Views: 782
Reputation: 76918
How do I make nuget upgrade itself to the latest version?
You can run the command nuget update -self
from VS 2017 Developer Command Prompt without following error:
'nuget' is not recognized as an internal or external command, operable program or batch file.
That means that you should added a path of nuget.exe
to the environment variable before or you have a old nuget.exe under the path C:\Users\bboyl\Source
.
If you want to update nuget itself, you could manually download the the newer version form nuget.org, Under the section titled "Windows x86 Commandline", replace the old version in the path on your PC.
BTW, It seems the nuget.exe version 2.0.30619.9000
of the system environment variable path is too low to automatically update. So we have to update it manually, just download the new version of nuget.exe
.
For example, I have a nuget.exe with version 4.1.0.2450
under the path D:\NuGet4.0
, then I set this path into the environment variable. After that, I could update the nuget.exe
itself to 4.4.1
in the VS 2017 Developer Command Prompt:
Now we could also update nuget itself with the command nuget update -self
.
Upvotes: 0