Quick Tip: Find the Four-Part Name for an Assembly

When developing for SharePoint, you sometimes need to find the four-part name for an assembly. You can do this inside of Visual Studio 2010 using PowerShell. It’s pretty straight-forward.

  1. In the Tools menu of Visual Studio, click External Tools.
    Tools Menu
  2. In the dialog, click Add to get a new tool.
    External Tools Menu
  3. Now, configure the tool with the following options:
    Title: Get Four-Part Name
    Command: powershell.exe
    Arguments: –command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName
    Use Output window: Checked
  4. Click OK to dismiss the window.

Now, you can go into the Tools menu to see your tool. If you click it, it will print out the four-part name including the public key token in your Output window.