NuGet 警告 NU3015

方案 1

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The lifetime signing EKU in the primary signature's certificate is not supported.

问题

用于对包进行签名的证书具有不支持的扩展密钥用法。

解决方案

请确保签名证书没有生存期签名扩展密钥用法。

方案 2

Package 'SamplePackage v1.0.0' from source 'https://contoso.com/index.json': The lifetime signing EKU in the signing certificate is not supported.

问题

用于对包进行签名的证书具有不支持的扩展密钥用法。

解决方案

请确保包是用没有生存期签名扩展密钥用法的签名证书进行签名的。

注意

当 NuGet 的签名验证模式设为“接受”(默认值)时,NU3015 将显示为警告。 当 NuGet 的签名验证模式设为“需要”或在运行 nuget verify -signatures 命令时,NU3015 将从警告提升为错误。