Signing an assembly with a .pfx file using SignTool.exe.

Just follow these steps:

  • Install your .pfx file in the machine certificate store.
  • Open mmc.exe, add the certificate snap-in and look for your installed certificate in the local machine storage.
  • Copy the certificate name.
  • Sign your assembly with the following command line: „C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe“ sign /sm /n „{YOUR CERTIFICATE NAME}“ /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp „$(TargetPath)“
  • I’m using this command line in my post build events. You can just replace „$(TargetPath)“ with the full path to your .dll to run the command in a separated command window.

Share

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

*