Can't cache latest version of nuget

matthamilton's Avatar


02 Dec, 2019 07:18 AM

I need a newer version of nuget.exe because of the icon element. I am trying to cache version 5.3.1, but as you can see from my build history, it isn't working: Commenting out chocolatey caching, doing a successful build, and then restoring caching just goes back to finding nuget v4.9.2.
Any idea what I am doing wrong?

  1. Support Staff 1 Posted by Feodor Fitsner on 03 Dec, 2019 06:42 PM

    Feodor Fitsner's Avatar

    You can try downloading nuget.exe via script to a known location and then caching that known location (C:\Tools\NuGet):

    $nugetPath = "$env:SYSTEMDRIVE\Tools\NuGet"
    (New-Object Net.WebClient).DownloadFile('', "$nugetPath\nuget.exe")

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

05 Dec, 2019 09:12 PM
04 Dec, 2019 07:46 PM
04 Dec, 2019 12:01 AM
04 Dec, 2019 12:00 AM
03 Dec, 2019 11:00 PM