When you want sing you application you can user any certificate for sign but in most time can occur problem in visual studio which cannot uset your cerfificate.
Here is workarround which works perfectly
(here is copy)
I own a Comodo (.p12) certificate and ran into the same issue and solved it based on @SmithPlatts answer and @Ares comment. Here is a detailed walkthrough for those who are not savvy (like me) with certificates:
- Open Command Prompt with admin privileges.
- Type command:
certutil -importPFX "<certFilepath>\<certFilename>.p12" AT_SIGNATURE(AT_SIGNATURE is what makes this work instead of [Right-click .p12 file]–>’Install PFX‘)
- Type a password of your choice.
- Open mmc.exe with admin privileges, File–>Add/Remove Snap-in…
- Add ‚Certificates‘
- Choose ‚Computer Account‘
- Under Console Root/Certificates (Local Computer)/Personal/Certificates locate your certificate installed by step 2.
- Right click Cert/All Tasks/Export–>Next/Yes, export the private key
- Go to ‚Personal Information Exchange – PKCS #12 (.PFX)‘
- Uncheck ‚Include all certificates…‘. Important! If checked VS will produce this message: „Cannot find the certificate and private key for decryption“ when signing.
- Check ‚Export all extended properties‘ (Optional).
- You can check ‚Delete the private key…‘ if you are not planning to re-export in the future.
- Tick password and type the password of step 3.
- Choose file path and file name for the exported (.pfx) certificate.
- Use exported .pfx file to sign your assembly/project from VS.
- Build project to make sure that pfx works properly.