NuGet 警告 NU3012
方案 1
Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The primary signature validation failed.
问题
NuGet 客户端无法验证包中 NuGet 签名内存在的 SignedCms
签名。
解决方案
可通过查看调试日志来获取有关此问题的更多详细信息。 如果问题仍然存在,请在 NuGet/Home 中提交问题并附上出现此问题的包。
方案 2
Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The primary signature found a chain building issue: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
问题
NuGet 客户端无法验证用于对包进行签名的签名证书的证书链。
解决方案
请确保包签名具有有效的证书链。 可通过对包运行 nuget verify -signatures
命令来验证包签名。 如果问题仍然存在,请在 NuGet/Home 中提交问题并附上出现此问题的包。
注意
如果 NuGet 的 签名验证模式设为“接受”(默认值),则大多数情况下 NU3012 均会显示为警告。
当 NuGet 的签名验证模式设为“需要”或在运行 nuget verify -signatures
命令时,NU3012 将从警告提升为错误。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈