4

I'm playing with dotnet-tool and nuget; I noticed that if I push a refresh nameOfPackage.nupkg to the nuget repo and then run dotnet tool update -g nameOfPackage it does not take the new package version.

I have to force a cache clear to get it to take the latest one.

dotnet nuget locals http-cache -c

I previously installed the package doing

dotnet tool update -g nameOfPackage

Is this by design? Do I have to flush the cache every single time to make sure there are no updates to the tool?

JosephS
  • 744
  • 5
  • 22

1 Answers1

5

Adding the --no-cache option forces the update.

dotnet tool update -g nameOfPackage --no-cache

enter image description here

Source: dotnet tool update

JosephS
  • 744
  • 5
  • 22
  • 2
    I had this issue with GitHub Nuget feed. Somehow the latest version isn't updated. `--no-cache` helped. – Luke Vo May 04 '22 at 19:52