Question

I recently got a new code signing certificate. I'm using MSBuild's SignFile task to sign an application manifest. For some reason the task is returning:

MSB3481: The signing certificate could not be located.
Ensure that it is in the current user's personal store.

The certificate is definitely in my personal store, I can see it in certmgr.msc. And I believe that I'm logged in as the same user since I'm able to sign the manifest using a different certificate that is in the same personal store. Not sure why this new certificate cannot be found.

I'm even able to use signtool.exe with the new certificate's SHA1 to sign files just fine. But I would really prefer to use our existing MSBuild with the SignFile task. Any ideas what could be going wrong here?

I've also tried importing the certificate with and without the complete certification path.

Was it helpful?

Solution

I not sure that this could help, but I remember that if you are copying thumbprint from snap-in field, there is an "invisible" symbol in first position. So this thumbprint with that non-printable can't be located in your store. Try to remove 3-5 symbols from beginning of certificate thumbprint (including quotes) and type them manually.

Also take in account that thumbprint should be all uppercase (despite that property displayed in lowercase).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top