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")
  2. 2 Posted by matthamilton on 09 Dec, 2019 05:35 AM

    matthamilton's Avatar

    Alright, thanks.

  3. matthamilton closed this discussion on 09 Dec, 2019 05:35 AM.

Comments are currently closed for this discussion. You can start a new one.

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