NuGet 错误 NU3008

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The package integrity check failed. The package has changed since it was signed. Try clearing the local http-cache and run nuget operation again.

问题

自完成签名后,正在验证的 NuGet 包却已更改。

解决方案

请确保包自完成签名后未被篡改。 如果这是暂时性问题,则可通过运行 nuget locals http-cache -cleardotnet nuget locals http-cache --clear 命令清除本地 HTTP 缓存来解决此问题。 但如果问题仍然存在,请通知包源和包作者。

如果此问题出现于来自 nuget.org 的包上,请在 NuGet/Home 中提交问题并附上导致此问题的包。