question

GA-1202 avatar image
0 Votes"
GA-1202 asked GA-1202 answered

Code Signing Error in Visual Studio 2019

I am trying to sign an output program from my Visual Studio 2019 build with my recently issued certificate. However, I get the following error:

SignTool Error: An unexpected internal error has occurred.
Error information: "Error: SignerSign() failed." (-2146893779/0x8009002d)


I get the following error both within Visual Studio (using the Signing page for the project properties) and through the CLI tool. I did try running the command with debug as a flag, but it ends up stuck in the same error message above. I have successfully signed the software with a test certificate.

I’ve tried looking online for support but cannot find helpful information.
Are there any experts in Code Signing for C# projects for Visual Studio that could help me out?

dotnet-runtime
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GA-1202 ,
Please check the following link to see if it helps.
https://social.technet.microsoft.com/Forums/en-US/c1c16881-7e5e-48cd-b963-9c2e3478fc07/signtool-error-signersign-failed-21468937920x80090020
Since you successfully signed the software with a test certificate, the cause can also be a certificate problem such as a wrong certificate format.

0 Votes 0 ·
GA-1202 avatar image GA-1202 JiachenLiMFST-9349 ·

Hello @JiachenLiMFST-9349 , I did see the page you mentioned but it's not the same error. I did try the steps however, to no luck. The COM error code I see is as follows:

NTE_INTERNAL_ERROR
0x8009002D
An internal consistency check failed.

Do you know of any other resources/steps to try?

0 Votes 0 ·

Hi @GA-1202 ,
It is recommended that you post the problem on Visual Studio Developer Community



0 Votes 0 ·

1 Answer

GA-1202 avatar image
0 Votes"
GA-1202 answered

I figured out what was wrong today -

Looking under the log files for our certificate provider's tools - I found that it was unable to find the certificate file at the path specified by the environment variable. I updated the path and it works now.

For future reference, check environment variables are set correctly

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.