by Andreas

Visual Studio 2008 tip: how to get public key token for assembly

Simple trick for generating public key token from the Tools menu (for example when deploying Sharepoint 2007 webparts):

1. In Visual Studio, choose Tools –> External tools…

2. Click Add, enter
* Title = Get public key
* Command = C:Program Files (x86)Microsoft Visual Studio 8SDKv2.0Binsn.exe
* Arguments = -Tp “$(TargetPath)”
* Ensure that just “Use Output window” is checked, none of the others

image

3. Click OK and you now have a new entry under the Tools meny

image

This will give you the public key token in the output window.