好吧 - 这真的很奇怪。我有一个TFS构建签名文件,我收到上面的消息。如果我从构建中查看日志,它说它已成功签名并为我的文件添加了时间戳(有一个手动调用signtool的.proj文件),但是在其他步骤之下(不确定在哪里) - 我假设它在ClickOnce签署我得到错误。获取签名时发生错误:无法签署file.exe。 SignTool错误:未找到符合所有给定条件的证书
我能够使用Signtool使用与构建使用相同的参数自己签署文件,所以我想也许我需要导入他的证书,所以我打开mmc,添加证书管理单元,通过导入向导使用本地机器来安装它(TFS构建运行在与我不同的帐户下,我不知道该帐户的密码,所以我认为在机器级别安装它会起作用)。我浏览该文件,并将其成功导入到受信任的根证书颁发机构(见下文)中:
仍然在构建时出现错误。 signtool从TFS构建中调用的.proj文件调用,但在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:
任何想法我可能会错过吗?