Code Signing Error in Visual Studio 2019

GA 1 Reputation point
2022-09-21T22:10:31.863+00:00

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?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,117 questions
{count} votes

1 answer

Sort by: Most helpful
  1. GA 1 Reputation point
    2022-09-26T17:46:43.327+00:00

    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

    0 comments No comments