PublicKey of System.Xml assembly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to make some classes in my assembly internal. I am using XMLSerializer
to serialize the objects of my classes. XMLSerializer cannot access my
internal classes. So I am thinking that adding System.Xml as a friend would
make my internal classes visible to XMLSerializer.

Adding System.Xml as a friend requires public key of the System.Xml assembly
specified. I can get the PublicKeyToken, but not the public key. I tried
following code also but no luck, it just returns 16 bytes (0000000040000000).

Assembly assembly = Assembly.GetAssembly(

typeof(System.Xml.Serialization.XmlSerializer));
byte[] pubkey = assembly.GetName().GetPublicKey();


Any ideas to get the public key of System.Xml assembly, it doesn't have to
be programatically.

Thanks!
 
It turns out that "0000000040000000" is in fact the public key for System.Xml.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top