Skip to main content

Visual Studio: Create a Tool to Get the Public Key of an Assembly

To add a Get Assembly Public Key item to the Tools menu


  1. In Visual Studio, click External Tools on the Tools menu.
  2. In the External Tools dialog box, click Add and enter Get Assembly Public Key in the Title box.
  3. Fill the Command box by browsing to sn.exe. It is typically installed at the following location: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0a\Bin\x64\sn.exe.
  4. In the Arguments box, type the following (case sensitive): -Tp $(TargetPath).
  5. Select the Use Output window check box.
  6. Click OK. The new command is added to the Tools menu.

Comments