Cannot import the following key file error when importing pfx

后端 未结 8 1822
名媛妹妹
名媛妹妹 2021-02-01 17:03

I researched this question thoroughly on stackoverflow and I have seen numerous answers but none of them have worked for us yet. We recently bought a code signing certificate fr

8条回答
  •  天命终不由人
    2021-02-01 17:39

    I have learned that Visual Studio doesn't seem to handle subordinate certificates very well.
    I tried several certs on multiple machines (different OS/VS combinations) with the same results.
    I finally found this as a workaround:

    • Sign the assembly with

      signtool sign /f "[path to pfx]" /p [password] /v "[path to assembly]"

    • Build your installer with mageUI (see "Manually Deploying a ClickOnce Application")

    The issue with Visual Studio seems to be that it does not like certificate chaining. This you can solve by importing/exporting the certificate without the chaining. The next issue is addressed by using the certutil and export with the AT_SIGNATURE. I was able to import it into VS and build, however it doesn't seem to sign the assembly.

提交回复
热议问题