An error occurred while signing with SignTool Error

When I opened an old .NET project in Visual Studio 2013, I got the following error when I tried to rebuild the project:

Error    1    An error occurred while signing: Failed to sign bin\Release\app.publish\xxxx.exe. SignTool Error: No certificates were found that met all the given criteria.    xxxx

image

The reason should caused by the old .NET framework platform about ClickOnce manifest certificate.

(Right click the main project and select properties, and then click Signing tab, you will see the Signing Certificate date expired since the project is old.)

From Visual Studio 2008 SP1, the Signing of ClickOne manifest certificate is optional. so we can do the following steps to resolve issue:

1: Right click the main project and select properties, and then click Signing tab, you will see the Signing Certificate date expired since the project is old.

Now click Create Test Certificate… button, then popup a window asks you input password, you can input NOTHING and click OK button directly.

image

2: Now your project should be able to rebuild.

3: If possible, you’d better change your project’s target .NET framework version to higher;

4: After done above step 3, if you do not need ClickOnce feature,you can check off the “Sign the ClickOnce manifests”;

Done.