by Markus
8. December 2009 18:38
How to Sign Assemblies with SignTool.exe
First of all you have to get a Certificate. This is a really annoying part because you have to buy one.
There are some open Source Projects like openSSL und CACert but right now they have no acceptance integrated in the Operating System or in the Browser, so there will be still a security warning…
Once you installed the certificate you can sign your assemblies by putting the following call in the Post-build event Command line under Properties – Build Events of the Project:
"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\Signtool.exe" sign /a /v /sha1 B12CB2710390A365DB06423DD1246A7DC2A9FBF7 /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath)
Note: The Example is for a Cetrificate from Verisign so if you buy a certificate from another vendor you have to change the URL http://timestamp.verisign.com/scripts/timstamp.dll
If you want to build your Project with the TFS Build Task you can also use this command in the Build-Script in the After Compile Target.
<Target Name="AfterBuild">
<Exec Command=""C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\Signtool.exe" sign /a /v /sha1 B12CB2710390A365DB06423DD1246A7DC2A9FBF7 /t http://timestamp.verisign.com/scripts/timstamp.dll "$(TargetPath)"" />
</Target>
< Back to Home Page
d7f0ad83-4a1b-415f-bdcd-cb2073c2e1ce|0|.0
Tags: