问题
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
回答1:
This bug from the Chocolatey GitHub repo suggests that you need to clear the NuGet cache (%LocalAppData%\NuGet\Cache) and this should resolve itself.
回答2:
Please try-
- Clean scriptcs_packages folder.
- Clean scriptcs_packages.config file.
- Then reinstall all packages needed .
Run scriptcs
来源:https://stackoverflow.com/questions/18661114/scriptcs-unable-to-read-package