Tuesday, October 22, 2013

How to get the assembly public key token using Visual Studio 2012

Problem:
I have done the custom form authentication for SharePoint. For web.config change, I need the publickKeyToken.

Solutions:
1. In start menu, open “Developer Command Prompt for VS2012”
2. In command prompt type “sn –T” and drag and drop the dll from Windows Explorer to automatically enter the dll location...like below (Note: use –T instead of –t because case sensitive)

EXAMPLE
C:\Program Files (x86)\Microsoft Visual Studio 11.0>sn -T "C:\Users\ulrics1\Docu
ments\Visual Studio 2012\Projects\PMC.GlobalNav\PMC.GlobalNav\bin\Debug\PMC.Glob
alNav.dll"
Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.17929
Copyright (c) Microsoft Corporation.  All rights reserved.
Public key token is 487ed81b6367c7bd