I need to get a dll public key token. I know that that is possible by loading the dll and getting that information:
Assembly.GetExecutingAssembly().GetName().GetPublicKeyToken();
Unfortunatelly I might need to change the dll during run time, so I cannot have it loaded.
Is there any way of getting that information without having to load the dll? Even by giving the actual path of the dll?
Side note: I can also get that information by using System.Diagnostics to start a process to use the utility SN to get that information, but I would like to avoid that.
It is possible to get the public token without loading the asssembly by doing:
AssemblyName.GetAssemblyName("assembly-path.dll").GetPublicKeyToken();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With