Archive

Posts Tagged ‘4-Part-Assembly-Name’

Simple way to get the 4-part strong name for an assembly

February 26, 2010 Chris Forbes 2 comments

As you will know when building SharePoint solutions you always need to determine the 4-part assembly name or Strong Name for inclusion in various solution and feature manifests. I typically got this by pointing Reflector at my compiled DLL files.

image

Simpler way using Power Shell

Using the ‘External Tools’ option within visual studio you can create a quick link, so from your solution just click the ‘Get 4-Part Name’ link and out pops the 4-part assembly name in you’re output window.

image

Resulting output window…

image

How to add a new External Tool

Select ‘External Tools…’ from the Tools menu in Visual Studio

image

TITLE : Give the tool a title. You can use an ‘&’ character which will act as a short cut i.e. ALT+G.

COMMAND : powershell.exe

Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"

3. Make sure you check ‘use output window’ to post the result in the VS output window.

 

Simple but a great time saver :)