scriptcs - Unable to read package

2019-07-03 04:00发布

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

2条回答
霸刀☆藐视天下
2楼-- · 2019-07-03 04:07

Please try-

  • Clean scriptcs_packages folder.
  • Clean scriptcs_packages.config file.
  • Then reinstall all packages needed .

Run scriptcs

查看更多
Juvenile、少年°
3楼-- · 2019-07-03 04:18

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

查看更多
登录 后发表回答