.net - PFX 强命名

标签 .net code-signing pfx

我试图用 PFX 强命名一个程序集也用于数字签名的文件。 PFX 证书具有 CodeSigning 选项,由 CA 提供。 .

当我尝试使用它时,出现以下错误:

error MSB3325: Cannot import the following key file: myCert.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_B763CB2413AC1708



我试图删除它并使用重新安装 PFX
sn -d VS_KEY_B763CB2413AC1708
sn -i myCert.pfx VS_KEY_B763CB2413AC1708

但这没有用。我试图将证书放在证书存储中 - 这也没有改变任何事情。我尝试以管理员身份运行 Visual Studio 并执行 MSBuild从命令行。

我还尝试使用本地生成的证书(有效)延迟对程序集进行签名,然后使用
sn -R myAssembly.dll myCert.pfx

然后我收到以下错误:
Failed to re-sign the assembly -- Keyset does not exist

我在 ClickOnce Manifest Signing and Strong-Name Assembly Signing Using Visual Studio Project Designer's Signing Page, Signing Assemblies 中找到了代码签名证书的要求.看起来他们都见过面,但我可能遗漏了一些东西。我该如何解决这个问题?

最佳答案

我希望这将有助于快速解决。去

Visual Studio 项目属性 -> 签名 -> 登录程序集 -> 选择强名称文件 ->(下拉)选择浏览.. -> 选择 <您的>.pfx 文件 -> 确定**

瞧,你已经准备好执行你的项目了。

关于.net - PFX 强命名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8212923/

相关文章:

.net - 为什么 .net WCF 服务需要接口(interface)

c# - 类型或命名空间不存在

ios - 手动管理 faSTLane 匹配 Repo

c++ - 将 pfx 证书转换为 PEM 格式

java - 使用 Windows 下生成的 (.PFX) 证书对 Java 中的文本进行签名

openssl - 从 .cer 和 .pem 文件创建 pfx 文件

.net - 中止阻塞线程

c# - 如何从基类中获取自定义属性?

android - 应用程序签名证书和上传证书具有相同的指纹

.net - 续订代码签名证书后,ClickOnce 升级期间用户设置丢失