0

SignTool Error: An unexpected internal error has occurred. error MSB3482

3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(3975,5): error MSB3482: An error occurred while signing: Failed to sign bin\Debug\app.publish\Halmanac.exe. SignTool Error: An unexpected internal error has occurred.

The error is the clickonce publish process for a winforms application in C# with clickonce deployment using a Code Signing Certificate from GoDaddy. The Certificate is good and current - expires 09-22-2020. If I remove the certificate (uncheck code signing), the error goes away and I can publish the exe. I want the certificate to prevent installation problems.

The application has been running for many years with minor changes each year. When I got the error, I restored a 6 months old copy that had been deployed with the certificate and I got the same error. Therefore, something has changed on the computer. I am running a current version of Windows 10.

How do I troubleshot this problem?

What do you recommend I do?

2 Answers2

2

I don't know if this is your case, but in my case I was getting this error on an old project that I have not updated since 2019, I need to do some fixes and publish again. And this error shows with no changes to the project files (only code).

After reading this: SignerSign() failed. (-2146869243/0x80096005)

Because of other Error with the exe sign, I revisited the code sign setting page and see that was using the timestamp server with the URL: http://timestamp.comodoca.com/?td=sha256

I removed the /?td=256 part leaving it like: http://timestamp.comodoca.com

And now the project compiles with no problem

  • This fixed it for me. I went so far as to rebuild my project, and I was able to sign. Until I reached the publish step, so I knew it was something relating to publishing. Thanks! – Mmm Jun 28 '21 at 03:40
0

I wanted to provide an answer to my own question. After a lot of research into all kinds of possible causes. I did use the signtool to sign the EXE manually. This atleast proved the signtool and CSC were working. In my last step, I looked at the compile parameters for 32bit and 64bit output exes. The software is one EXE and 2 DLLs. I made sure to examine every parameter involved in making the EXE. After a number of changes/fixes/tweaking, the software published a Clickonce EXE. I installed the EXE from the Internet and everything worked. I do not know what fixed the problem, but the error is gone. In my opinion, there was a conflict in parameters between the EXE and DLLs. Robert Neal 07-15-2020