More from inside the firewall…
Question: Is there a way (not
programmatically) to find out if a given assembly is strong named or not?
Can we assign a strong name to an
assembly that is already compiled with specifying a
Answer: To determine whether an
assembly is strong named there are several alternatives. Use ILDASM and look for
a .publickey directive in the .assembly section. Use SN -T <assembly> (the
case of the -T option is important, -t means something different) and see
whether you get back a public key token or an error informing you the assembly
is not a valid strong named assembly.
You cannot convert a weakly named
assembly to a strongly named one. Doing so involves changing the name of the
assembly (by adding a public key to it) so isn't generally a useful operation.
On top of that there would be a lot of structural problems to resolve
(re-writing metadata and the PE format updates) so it's a non-trivial task. It
becomes easier to totally rewrite the assembly, which you might be able to
accomplish using ILDASM then ILASM (if your assembly doesn't contain mixed
managed and unmanaged code). Whether you can do this rather depends on the
licensing for the component involved of course.