A couple of things to remember when releasing a VSTO add-in to production:
- The certificate used to sign the ClickOnce manifest
- Must be verifiable on the build machine (root CA and intermediate CAs must be trusted on the machine)
- Must be a certificate that has "code signing" among its purposes. This means that both of these items must be true:
- The Extended Key Usage (EKU) field of the certificate must either be unset or contain the EKU value for code signing (184.108.40.206.220.127.116.11.3). 18.104.22.168.22.214.171.124.3 indicates that the certificate is valid for code signing. Always specify this value to limit the intended use for the certificate.
- The Key Usage (KU) field of the certificate must either be unset or contain the usage bit for digital signature (0x80).
- Must include the private key
- Also, if you want to silently deploy the add-in to target machines by calling VSTOInstaller.exe with the "/s" (silent) switch, the public key of the certificate used to sign the add-in must be imported in the "Trusted Publishers" folder of the intended end user certificate store or the "Trusted Publishers" folder of the local machine certificate store
In the EKU certificate field you might also want to specify value 126.96.36.199.4.1.3188.8.131.52 indicating that the certificate respects lifetime signing. Typically, if a signature is time stamped, as long as the certificate was valid at the point when it was time stamped, the signature remains valid even if the certificate expires. This EKU forces the signature to expire regardless of whether the signature is time stamped.