An error occurred while signing

When you deploy and application in Microsoft Visual Studio with ClickOnce, you need to sign the installer with a key.

To sign the project Visual Studio needs to use the signtool. If the ClickOnce feature is not enabled in Visual studio, it displays the following error message:

An error occurred while signing: SignTool.exe was not found at path C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\signtool.exe

To install the ClickOnce feature and the signtool

On Windows 7

  • In Windows Control panel select Programs and Features,
  • Right click Visual Studio 2015 and select Modify,
  • In the feature list select ClickOnce tools.

On Windows 10

  • In Windows Control Panel select System,
  • On the left side select Apps & features,
  • In the app list click Microsoft Visual Studio 2015,
  • Click the Modify button,
  • In the Visual Studio setup click the Modify button again,
  • In the feature list select ClickOnce Publishing Tools.

 

Troubleshooting

When you have been able to successfully sign your Click Once applications in the past and suddenly you get the error message

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

it is possible that the certificate you used to sign your app has expired. To check the validity of the certificate

  1. In Visual Studio open the project’s properties page,
  2. On the Signing tab check the expiration date of the certificate.

Create a new certificate

To create a new certificate

  1. On the Signing tab of the project properties page click the Create Test Certificate button,
  2. Enter a password for the new certificate.
  3. Click the down arrow next to the key file name and select the new key file in the dropdown list.
  4. Save the project file and build your application.

 

 

 

Leave a comment

Your email address will not be published. Required fields are marked *