【发布时间】:2017-09-13 14:33:04
【问题描述】:
好的 - 所以这真的很奇怪。我有一个签署文件的 TFS 版本,我收到了上面的消息。如果我查看构建中的日志,它会说它已成功签署并为我的文件加上时间戳(有一个手动调用 signtool 的 .proj 文件),但在不同的步骤中(不确定确切的位置) - 我假设它在ClickOnce 签名我得到错误。
我可以使用 Signtool 使用与构建使用相同的参数自己对文件进行签名,所以我想也许我需要导入他的证书,所以我打开了 mmc,添加了证书管理单元,完成了导入向导使用本地机器安装它(TFS 构建在与我不同的帐户下运行,我不知道该帐户的密码,所以我认为在机器级别安装它会起作用)。我浏览了该文件并将其成功导入受信任的根证书颁发机构(见下文):
我在构建时仍然遇到错误。从 TFS 构建中调用的 .proj 文件调用 signtool,然后在 ClickOnce 期间再次由构建调用。通过 VS 屏幕导入证书后,我现在看到:
并得到这个错误:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (2718): Unable to find code signing certificate in the current user’s Windows certificate store. To correct this, either disable signing of the ClickOnce manifest or install the certificate into the certificate store.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (2718): Cannot import the following key file: . The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store.
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets (2718): Importing key file "les.pfx" was canceled.
证书与 .csproj 位于同一文件夹中,并且正在导入到商店中。
Here's the cert info and the Thumbprint matches what's in the .csproj file:
有什么我可能在这里遗漏的想法吗?
【问题讨论】:
标签: visual-studio clickonce sign signtool