PublicKeyToken

There are times when we need to know the PublicKeyToken of our .NET assembly (i.e. when we develop workflows for Office SharePoint Server) and we can achieve that by installing the assembly to the Global Assembly Cache (GAC) or use a disassembler. But today, I found an easier way which is to use the sn.exe tool.

To return the PublicKeyToken of an assembly, issue the following command on a Visual Studio Command Prompt:

sn -T <assembly-name>

To return the Public Key together with the token, use the -Tp argument instead.

No comments:

Post a Comment

Popular Post