This tip will make it easy for you to get that assembly name right within Visual Studio.
This applies to both SP2010 and SP2007.
- In Visual Studio, Go to Tools –> External Tools.
- Click on “Add” to add a tool, and put in the following values:
- Title: S&trong Name
- Command: Powershell.exe
- Arguments: -command "[System.Reflection.AssemblyName]::GetAssemblyName(\"$(TargetPath)\").FullName"
- Check “Use Output Window”
- Uncheck everything else – here’s how it should look -
3. That’s it, now in your project, Visit Tools –> Strong Name, and in the output window, itwill give you the assembly name like this –>
SandBoxWebPartWithProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=64b818b3ff69ccfa
On
12/6/2009 10:29:54 PM
Harish Mathanan
said ..
Nice tip! thanks Sahil :)
|
On
2/23/2010 1:02:43 AM
Venkatesh
said ..
Hi,
In the command, when i give "Powershell.exe", I am getting error as "Command is not a valid executable".. How to correct this?
Thank you
|
On
7/18/2010 1:44:55 PM
Andrew Vevers
said ..
Hello
I am getting the error:
Exception calling "GetAssemblyName" with "1" argument(s): "The path is not of a
legal form."
At line:1 char:50
+ [System.Reflection.AssemblyName]::GetAssemblyName <<<< ("").FullName
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
- any ideas?
Am using it against a SharePoint 2010 solution.
Regards
Andrew
|
On
7/18/2010 10:12:12 PM
Sahil Malik
said ..
Is your project built yet Andrew?
|