jquerynugetscriptcs

scriptcs - Unable to read package


I followed a blog post to get scriptcs running in just two steps. Basically, I did this:

@powershell -NoProfile -ExecutionPolicy Unrestricted -Command "iex ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

And then I got an error when doing this:

cinst scriptcs

Unable to read package from path 'jQuery.2.0.1.1.nupkg'.

This worked on a different machine, but it's failing on my current laptop. Any idea what I'm doing incorrectly?

EDIT

As per Damian's answer, below, I just had to delete the contents of the NuGet cache, located here:

C:\Users\userName\AppData\Local\NuGet\Cache


Solution

  • This bug from the Chocolatey GitHub repo suggests that you need to clear the NuGet cache (%LocalAppData%\NuGet\Cache) and this should resolve itself.