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_thumb12
  2. In the dialog, click Add to get a new tool.
    External-Tools-Menu_thumb9
  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
    image_thumb5
  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.

image_thumb8