crickpaolo
asked on
Get the PublicKeyToken of an assembly
I have an ASP.NET web application that uses a bunch of assemblies. They are all declared under the <assemblies> tag on web.config. I have a couple of questions regarding this:
1. How do I get the PublickKeyToken for a particular .dll?
2. If the assembly is declared in the web.config, does that always mean that it is located on the GAC?
Many thanks.
1. How do I get the PublickKeyToken for a particular .dll?
2. If the assembly is declared in the web.config, does that always mean that it is located on the GAC?
Many thanks.
ASKER
Here's my situation:
I inherited an ASP.NET application (written in 2005) that uses several assemblies. One of the assemblies, for example, is declared on web.config as:
<add assembly="eWorld.UI, Version=1.9.0.0, Culture=neutral, PublicKeyToken=24X65337282 035F2"/>
I didn't know what this assembly was, so I googled it, and it turned out to be a third party dll for creating calendar popups. I downloaded the assembly, but I can only download the latest version which is Version 2.0.0.0.
I changed the Version parameter on web.config, but I think I have to change the PublicKeyToken also, since it is a new version.
Thanks.
I inherited an ASP.NET application (written in 2005) that uses several assemblies. One of the assemblies, for example, is declared on web.config as:
<add assembly="eWorld.UI, Version=1.9.0.0, Culture=neutral, PublicKeyToken=24X65337282
I didn't know what this assembly was, so I googled it, and it turned out to be a third party dll for creating calendar popups. I downloaded the assembly, but I can only download the latest version which is Version 2.0.0.0.
I changed the Version parameter on web.config, but I think I have to change the PublicKeyToken also, since it is a new version.
Thanks.
Try the following commandline:
1) sn -T eWorld.dll
2) No - not necessarily
1) sn -T eWorld.dll
2) No - not necessarily
ASKER
I tried it on on the command line and I get this error:
'sn' is not recognized as an internal or external command,operable proggram or batch file.
do i need to go to a particular directory to run this command?
'sn' is not recognized as an internal or external command,operable proggram or batch file.
do i need to go to a particular directory to run this command?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If needed you should add quotes around the location of sn.
ASKER
It worked! Thanks!
Have you checked the following method?
System.AppDomain.CurrentDo