Search code examples
code-signingvisual-studio-2010

Visual Studio 2010 Assembly Signing: An attempt was made to reference a token that does not exist


I'm trying to sign an assembly in Visual Studio 2010 with our PFX file, after I enter the password for the private key I get "An attempt was made to reference a token that does not exist"


Solution

  • I have the same problem. Just use signtool from the Visual Studio command prompt instead. Sometimes signtool will claim your password is invalid, but usually after a couple of tries it starts working for me.

    signtool.exe sign /f YOURCERT.pfx /p YOURPASSWORD YOURTARGET.exe