Wednesday 13 June 2012

Retrieving the PublicKeyToken

Simplest way to get the public key Token which is sometimes needed when you build your assembly tag
 <%@ Assembly Name="Mobile.MasterPage, Version=, Culture=neutral, PublicKeyToken=8173e6146926d073" %>
Inside of Visual studio 2010 click on tools in your menu and select "External Tools..." from the drop down.

with The External Tools Dialogue open click the Add button on the right hand side and fill in the details specified:
  • Title: Get Public Token
  • Command: The Path to sn.exe (C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\sn.exe)
    if that's not the path for you just search your hard drive.
  • Arguments: -Tp $(TargetPath)
  • Initial Directory: (Leave it blank)
Make Sure to Check off: Use Output Window
and it should now appear in the tools drop down menu.