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-cache(s) 來修正此問題。 不過,如果問題持續發生,請通知套件來源和套件作者。

如果此問題發生在來自 nuget.org 的套件上,請在 NuGet/Home 以及造成此問題的套件提出問題。