{"id":249,"date":"2016-01-19T14:06:25","date_gmt":"2016-01-19T14:06:25","guid":{"rendered":"http:\/\/www.pkipartner.support\/?page_id=249"},"modified":"2016-01-28T12:27:57","modified_gmt":"2016-01-28T12:27:57","slug":"codesign-visual-studio-2005-error-cannot-find-the-certificate-and-private-key-for-decryption","status":"publish","type":"page","link":"https:\/\/pkipartner.com\/support\/codesign-visual-studio-2005-error-cannot-find-the-certificate-and-private-key-for-decryption\/","title":{"rendered":"Codesign &#8211; Visual Studio 2005 error &#8216;Cannot find the certificate and private key for decryption&#8217;"},"content":{"rendered":"<h1>Visual Studio 2005 error &#8216;Cannot find the certificate and private key for decryption&#8217;<\/h1>\n<h3>Assembly Signing Using Visual Studio Project Designer&#8217;s<\/h3>\n<p>Problem : The .pfx file cannot include certificate chaining information. (If the .pfx file does include this information, the following import error will occur: &#8220;Cannot find the certificate and private key for decryption.&#8221;)<\/p>\n<p><a href=\"http:\/\/www.pkipartner.com\/support\/wp-content\/uploads\/2016\/01\/CodeSign-Visual-Studio.gif\" rel=\"attachment wp-att-614\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-614\" src=\"http:\/\/www.pkipartner.com\/support\/wp-content\/uploads\/2016\/01\/CodeSign-Visual-Studio-300x108.gif\" alt=\"CodeSign - Visual Studio\" width=\"300\" height=\"108\" srcset=\"https:\/\/pkipartner.com\/support\/wp-content\/uploads\/2016\/01\/CodeSign-Visual-Studio-300x108.gif 300w, https:\/\/pkipartner.com\/support\/wp-content\/uploads\/2016\/01\/CodeSign-Visual-Studio-250x90.gif 250w, https:\/\/pkipartner.com\/support\/wp-content\/uploads\/2016\/01\/CodeSign-Visual-Studio-150x54.gif 150w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Resolution : The most common problem arises when using a .pfx file that contains chaining information. You can remove chaining information from the key file by running the Certificate Manager snap-in (Certmgr.msc), importing the pfx file into the personal certificate store, and then exporting it without including the certificate chain information. You can accomplish this by doing the following:<\/p>\n<p>1. On the Start menu, click Run, type mmc, and then click OK. The Console1 dialog box appears.<br \/>\n2. On the File menu, click Add\/Remove Snap-in. The Add\/Remove Snap-in dialog box appears.<br \/>\n3. Click Add. The Add Standalone Snap-in dialog box appears.<br \/>\n4. Click Certificates, and then click Add. The Certificates snap-in dialog box appears.<br \/>\n5. Select My User account, click Finish, click Close, and then click OK to close the dialog boxes.<br \/>\n6. Expand Certificates &#8211; Current User, expand Personal and then expand Certificates.<br \/>\n7. Right click on the Certificates node and from the context menu select All Tasks and Import.<br \/>\n8. The Certificate Import Wizard appears; click Next.<br \/>\n9. At the File to Import step, browse and select the .pfx file and then click Next.<br \/>\n10. Enter private key password information, check the option to mark this key as exportable, and then click Next.<br \/>\n11. At the Certificate Store step, go with the defaults to place into the Personal Certificate store, click Next, and then click Finish.<br \/>\n12. The certificate is now imported and ready for export. Select and right click on this certificate and, from the context menu, select All Tasks and Export.<br \/>\n13. The Certificate Export Wizard dialog appears; click Next.<br \/>\n14. At the Export Private Key step, select the option Yes to export the private key and then click Next.<br \/>\n15. At the Export File Format step, make sure the option to include all certificates in the certificate path is unchecked and click Next.<br \/>\n16. At the Password step, enter desired password information and click Next.<br \/>\n17. At the File to Export step, specify the file name, click Next, and then click Finish.<br \/>\n18. This should display the export was successful dialog; click OK.<\/p>\n<p>For more information please see the <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa730868(vs.80).aspx\">Microsoft Article<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2005 error &#8216;Cannot find the certificate and private key for decryption&#8217; Assembly Signing Using Visual Studio Project Designer&#8217;s Problem : The .pfx file cannot include certificate chaining information. (If the .pfx file does include this information, the following import error will occur: &#8220;Cannot find the certificate and private\u2026<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/pkipartner.com\/support\/codesign-visual-studio-2005-error-cannot-find-the-certificate-and-private-key-for-decryption\/\"><span>Continue reading<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/249"}],"collection":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":4,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/249\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/pages\/249\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/pkipartner.com\/support\/wp-json\/wp\/v2\/media?parent=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}