Tfs在线并安装.pfx

use*_*837 20 c# tfs azure-devops

Unable to build the assembly: 
C: \ Program Files (x86) \ MSBuild \ 12.0 \ bin \ amd64 \
Microsoft.Common.CurrentVersion.targets (2696): Cannot import the following key file: 
MyKey.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_977DBD18D1081093 
Run Code Online (Sandbox Code Playgroud)

我看了很多帖子,但没有一个帮我.如果我实际上无法访问服务器并且无法调用命令sn,我该如何安装证书.

Sha*_*ata 1

您好,使用 powershell 脚本来执行此操作,

我也遇到了同样的问题,但是如果不存在物理访问,则应用程序访问或脚本执行访问应该存在,否则这是不可能的。

  1. 首先创建密码

  2. Import-PfxCertificate -FilePath "yourfile.pfx" -Password $yourPassword Cert:certificateLocation

另外,如果您有构建服务帐户,那么

  • 使用构建服务帐户登录到构建机器

  • 在使用此签名密钥的任何项目上运行 msbuild。它将提示输入密码并导出密钥。

  • 现在开始 TeamBuild 完整构建。