Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tfs online and Install .pfx

Tags:

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 

I have read many posts, but none of them helped me. How can I install the certificate if I physically do not have access to the server and I can not call the command sn.

like image 472
user3733837 Avatar asked Jun 12 '14 11:06

user3733837


People also ask

How do I import a PFX to a certificate store?

Start Windows Explorer and select and hold (or right-click) the . pfx file, then select Open to open the Certificate Import Wizard. Follow the procedure in the Certificate Import Wizard to import the code-signing certificate into the Personal certificate store.

Where are PFX stored?

pfx” file that contains the certificate(s) and private key. Open Microsoft Management Console (MMC). In the Console Root expand Certificates (Local Computer). Your server certificate will be located in the Personal or Web Server sub-folder.

What is .PFX certificate?

A PFX file indicates a certificate in PKCS#12 format; it contains the certificate, the intermediate authority certificate necessary for the trustworthiness of the certificate, and the private key to the certificate. Think of it as an archive that stores everything you need to deploy a certificate.


1 Answers

Hi Use powershell script to do this ,

I also faced the same issue , but if physical access is not there , application access or script execution access should be there other wise it is not possible

  1. First create passoword

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

Also if you have build service account then

  • Logon to the build machine using the build service account

  • Run msbuild on any project that uses this signing key. It will prompt for the password and will export the key.

  • Now start the TeamBuild full build.

like image 87
Shaswata Avatar answered Oct 10 '22 16:10

Shaswata