Edit

Share via


MSB3482

This error occurs when MSBuild encounters an error while trying to sign an output file when running the SignFile task.

The message resembles the following, but this text is followed by additional information from the signing tool:

MSB3482: An error occurred while signing:

Check that the sign file exists.

Make sure the signing tool is installed; it's installed with Visual Studio. Look to the additional information provided by the signing tool to see more about what happened.

If the error mentions an option that isn't supported, like the /fd option, you might have an older version of signtool.exe that was found on the system. MSBuild needs the version installed with Visual Studio or the .NET SDK. The fix depends on your specific situation, but possible fixes include editing the PATH environment variable to reorder the directories, uninstalling, renaming, or otherwise hiding the old signtool.exe, or uninstalling or updating the software package it's a part of, for example, updating an old version of the Windows SDK.

If the thumbprint is invalid, it will trigger a cryptographic error, and you might see this error. Check the string value given as the CertificateThumbprint parameter to the SignFile task. The certificate thumbprint is the SHA-1 hash of the certificate. For more information, see Obtain the SHA-1 hash of a trusted root CA certificate. If you copy and paste the thumbprint from the certificate details, make sure you do not include the extra (3F) invisible character, which may prevent SignFile from finding the certificate.

Test certificates expire after a period of time. You might have to create a new one. See How to: Sign application and deployment manifests or for newer .NET projects in Visual Studio 2019 or later, see Deploy a .NET Windows Desktop application using ClickOnce.

When running in a non-interactive environment, such as a script in a pipeline, you can create a certificate by using the command-line tool certutil.

certutil –f –p [certificate_password] –importpfx <path to pfx file>