While reading Todd Beeker’s WSS v3 book, I ran across a section that describes how to add the sn command to Visual Studio’s toolbar. I wish I had learned this trick back when I was writing Office Smart Doc applications at Zurich.
Bleeker, Todd. (2007). Developer’s Guide to Windows Sharepoint Services 3.0. Charles River Media. Boston. pp 267-271.
1. Open Visual Studio.
2. Select Tools -> External Tools…
3. Click the Add button.
4. Enter a self-documenting title like "Get Public Key"
5. Click the ellipse button beside "Command" and browse for sn.exe
6. In the arguments box type in -Tp "$(TargetPath)"
7. Check the "Use Output Window" box.
8. Click OK.
9. Right-click on the toolbar and select Customize
10. Choose Tools from the Commands tab.
11. Find the External Tool n that corresponds with the command’s placement in the Tools menu.
12. Click close.
Once the button is on the toolbar you can use it to get the public key of any assembly that you have strong named. The token will display in the output window.