On Jul 15, 6:15*pm, jp2msft <jp2m...@discussions.microsoft.comwrote:
Where would I find the publicKeyToken for my simple DLL class?
This MSDN site shows how I want to use it:
http://msdn.microsoft.com/en-us/libr...sb(VS.80).aspx
When I look in my class's AssemblyInfo.cs file, I see where it was issueda
GUID (Not sure why! It does not contain a GUI...), but ther is nothing about
a publicKeyToken.
First of all, a GUID has nothing to do with GUI. The first is
"Globally Unique IDentifier", the second is "Graphical User
Interface".
Also, public key token is not associated with class; it is rather a
property of the assembly. If you want it, you'll have to sign your
assembly. To do this in Visual Studio, go to Project properties,
select the "Signing" tab on the left, tick "Sign the assembly"
checkbox, and generate a new keyfile via the combobox which will then
be enabled. If you want to do this manually without VS, read the
documentation on sn.exe utility on MSDN - it comes with .NET SDK.
Then, you can get the public key token of a signed assembly by using
sn.exe:
sn.exe -T MyAssembly.dll