MSBuild Error MSB3482

 

MSB3482: An error occurred while signing: '<error>'.

When you publish by using ClickOnce deployment or are using SignTool to sign manifests, you can encounter this error, which is generated by SignTool. Common issues are listed here.

An error occurred while signing: 'Value cannot be null. Parameter name: strongNameKey'.

This error might appear in the error list during ClickOnce deployment. The problem is caused by selecting an invalid signing key. Usually you are trying to use a key that is non-RSA encrypted. SignTool supports only RSA key encryption.

To correct this error, obtain a key with RSA encryption that is code signing enabled.

An error occurred while signing: 'A certificate chain could not be built to a trusted root authority.'

This error might appear in the error list during ClickOnce deployment. The problem is that the certificate has a chain or root authority that is not trusted on the user's computer. This typically occurs when moving certificates/keys from computer to computer.

To correct this error, install "root certificate" of the Certificate Authority (CA) that created it. Typically, you can go to the CA vendor's Web site and download it again as needed.

An error occurred while signing: 'Failed to sign ...\setup.exe. SignTool Error: ISignCode::Sign returned error: 0x80880253 The signer's certificate is not valid for signing.'

This error might appear in the error list during ClickOnce deployment.

The problem is most likely caused by the certificate not being within the valid dates, for example, if you have an expired certificate.

To correct this error, obtain an updated certificate that has a valid date.

For information about how to update the certificate, see article 925521, "You receive an error message when you try to update a Visual Studio 2005 ClickOnce application after the certificate that was used to sign the installation expires" in the Microsoft Knowledge Base at https://support.microsoft.com.

Keyset does not exist.

There may be a mismatch between the .pfx file and the certificate. Try deleting and reinstalling the certificate, and/or recreating the .pfx file.

key not valid for use in specified state

See https://blogs.msdn.com/b/smondal/archive/2012/05/08/an-error-occurred-while-signing-key-not-valid-for-use-in-specified-state.aspx

'The parameter is incorrect.

Is your build is running in a service or in a user account other than the one that imported the certificate? Try turning off any Local Security Policy settings that require private key protection. Next, delete and re-import the certificate for the build's user account.

The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation.

See this MSDN blog post.

See Also

Introduction to Code Signing
SignTool.exe (Sign Tool)
Signing Page, Project Designer
How to: Sign an Assembly (Visual Studio)
How to: Sign an Assembly with a Strong Name
Strong-Named Assemblies
Strong-Name Signing for Managed Applications
<PackageFiles> Element (Bootstrapper)