How to import certificate or install manually in VSOnline

Category: visual studio online

Question

Paulo A Pinto on Sat, 19 Mar 2016 01:22:00


Hello,

I'm using VSOnline and my project is digitally signed. Local works/builds fine but in the VSOnline I get this error.

How do I import the certificate into the build server? All the examples that I found is having access to the machine and run the "SN -i " command. How can I run this on the server?

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets (2883, 5)
Cannot import the following key file: XXXX.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_35F8EEFE2115FE66

tkx in advance for the help

Paulo Aboim Pinto
Odivelas - Portugal

Replies

Sunil Hurkadli on Sat, 19 Mar 2016 12:04:11


Greetings,
Thanks for posting here,

Please try the below steps it may help you:

  1. Please check for the key which is specifying in the error as whether it exists or not in the key container.

  2. If the key specified in the error message exists then try to run the below command by sign in to the Build Server account  sn –d(key specified in the error message) For example : if the key is VS_KEY_7174AB5A189B7774 then run the command as sn-d  VS_KEY_7174AB5A189B7774

  3. Then sign out from the build server account and login with your TFS build service account and execute
    sn -i key1.pfx (key specified in the error message).

For reference please check the link.

Thanks and Regards

Disclaimer

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

Paulo A Pinto on Thu, 24 Mar 2016 23:06:32


Hello and tkx for the answer.

How do we login on VisualStudio Online server?

if I had a physical machine to go and run this command I would, but I don't know how to run this command in the VisualStudio Online server.

best regards
Paulo Aboim Pinto
Odivelas - Portugal