or Create a profile
05 Jun, 2020 11:18 PM
I'm trying to add a PFX key for strong-signing my .NET assemblies through Import-PfxCertificate, it's being imported correctly, but when MsBuild starts, it cannot load the certificate and gives the following message:
"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_689BEEB655EEA138".
But if it was imported correctly, why msbuild can't use it?
The build log: https://ci.appveyor.com/project/alexmurari/repositive/builds/33350366
The appveyor.yml file: https://github.com/alexmurari/Repositive/blob/dev/appveyor.yml#L41
on 05 Jun, 2020 11:56 PM
Never seen such an error before. Try looking via RDP how the cert is installed: https://www.appveyor.com/docs/how-to/rdp-to-build-worker/
on 06 Jun, 2020 12:43 AM
After some more digging I fixed it by using this script:
Loading PFX files isn't as simple as it should be.
Apparently this problem has already popped up here some time ago: https://help.appveyor.com/discussions/problems/1350-strange-behavio....
Strange to have to use such complicated scripts for trivial tasks like signing assemblies. Anyway, it's working now.
on 06 Jun, 2020 12:47 AM
Maybe it depends on the certificate, as in our internal builds we are importing AppVeyor's signing certificate with just Import-PfxCertificate. However, we are signing with signtool.exe, not during the build, so this might be the difference as well.
Formatting help /
(switch to plain text)
(switch to Markdown)
You can attach files up to 10MB
If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.
A conversation has been started with the AppVeyor staff to resolve this discussion.
This discussion is private.
Only you and AppVeyor support staff can see and reply to it.
This discussion is public. Everyone can see and reply to it.
You can use Command ⌘ instead of Control ^ on Mac
Powered by Tender™.