我正在尝试使用VSTS中的持续集成和部署功能构建一次性点击应用程序(Visual Studio团队服务在线)我们正在尝试使用Hosted代理构建这个Visual Studio 2015我们在使用一个强名称密钥文件签名时遇到了困难的错误
MSB3326: Cannot import the following key file: xxxx.snk. 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.
在那之后
MSB3321: Importing key file "xxxx.pfx" was canceled.
我试图从商店和文件中选择更改位置并确保提交但没有成功.任何想法我如何克服这些错误或做错了什么.
选择答案的Clerification
只是想澄清是否有其他人有同样的问题,除了答案我必须将我的证书放在我的源代码控制代码中并提交它.然后选择其位置在VSTS Build上添加一个全局变量
$cert.Import("$(CertPath)", $password, [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]"PersistKeySet")
其中$(CertPath)就像是 $(Build.SourcesDirectory)\SharedSolutionFiles\CertificateName.pfx