visual-studio-2010 - 签名时出错 : Unknown error "-2147012894"

标签 visual-studio-2010 vsto clickonce digital-certificate pfx

我有从 https://www.globalsign.co.uk/ 购买的 .pfx 证书。我已使用它签署了我的 VSTO(Visual Studio 中的 Excel 加载项项目类型)项目的 ClickOnce list ,一切正常。使用一个月后,我尝试重建我的项目(曾经有效),现在它给了我一个错误:

An error occurred while signing: Unknown error "-2147012894"

证书完全有效且未过期,并且像下面这样手动签名效果很好:SignTool sign/f mycert.pfx/p password somefile.exe

我尝试删除个人/证书路径下 certmgr.msc 中的所有证书,但没有帮助。

以前有人遇到过这种错误吗?有什么建议吗?

最佳答案

令人惊讶的是,修复比预期更容易...我只需打开项目文件并删除与签署程序集相关的所有 xml 标记。例如:

  <PropertyGroup>
    <SignManifests>true</SignManifests>
  </PropertyGroup>
  <PropertyGroup>
    <ManifestKeyFile>mycert.pfx</ManifestKeyFile>
  </PropertyGroup>
  <PropertyGroup>
    <ManifestCertificateThumbprint>AB3S6</ManifestCertificateThumbprint>
  </PropertyGroup>
  <PropertyGroup>
    <ManifestTimestampUrl>http://timestamp.globalsign.com/scripts/timstamp.dll</ManifestTimestampUrl>
  </PropertyGroup>

之后,我只需转到“签名”选项卡并重新添加证书。这奏效了。希望这对将来的人有所帮助。

关于visual-studio-2010 - 签名时出错 : Unknown error "-2147012894",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15141763/

相关文章:

c# - 我的项目文件存储在哪里

c++ - 如何在 Visual C++ 2010 中构建两个单选按钮组

asp.net - 仅 Visual Studio 本地化和表单 : asp:button, asp :CheckBox reading default language . resx 文件

c# - Outlook 的 MailItem 正文中的按钮将调用内部插件函数

visual-studio - 如何通过 ClickOnce 部署 Visual Studio 插件?

c# - ClickOnce 需要 System.Windows.Interactivity 版本 4.5.0.0

c# - 如何检测套接字断开连接?

c# - 如何将新的 TextRange.Run 添加到 PowerPoint 文本框?

c# - 如何使用功能区 xml 将图像添加到按钮?

.net - Visual Studio 2013 中的 VC++ 2012 Runtime Bootstrapper 包在哪里?