6
votes

First I'd like to say:

  • My certificate is not expired (it expires in 12/31/2039)
  • My certificate has not changed
  • I don't want to use a new certificate because it will require me to reinstall my application on all client machines.

Suddenly when I try to publish my WCF/WPF solution I get:

Error 2 An error occurred while signing: Failed to sign bin\Debug\app.publish\setup.exe. SignTool Error: The signer's certificate is not valid for signing. SignTool Error: An error occurred while attempting to sign: bin\Debug\app.publish\setup.exe

Has anyone else experience this with a certificate that by all means should be valid? Any suggestions on what might be the problem?

2
Identical issue. We have spent two days trying to figure out what happened this past week. We are thinking it's related to patch Tuesday or one of us installing VS 2012 but are still lost really.Kevin
Well at least its good to know I'm not alone. I'm using V2 2012 as well. I published a day prior with no problems. That's a good thought. I'm going to look through for any recent Win 7 updates and see if I uninstall them.Brent Lamborn
Uninstalling all recent Windows updates did the trick!Brent Lamborn

2 Answers

5
votes

As indicated, in the case of Windows 7 KB2661254 (code key length < 1024) is the culprit but if you are running Windows 8 you cannot uninstall the KB and you need to discover the keys with length < 1024 and fix them.

See the KB article

http://support.microsoft.com/kb/2661254

UPDATE: It turns out that it was the root certificate for the self signed cert that was 512 bits, not the actual certificate itself. I regenerated on Windows 8 and all was fine with the new cert.

0
votes

AS Kevin suggested, I uninstalled all the Windows updates I got on the day the problem started (10/12/2012) and I was able to publish just fine. Thanks Kevin. I regret not getting a list of the KB's I removed prior to removing them though. :(