How to determine if assembly is a system assembly

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

Guest

Hi,
Any indeas how to programmatically (c#) decide if an assembly is a system
assembly?

Elad
 
Depends on what you mean by system assembly. If you just want to check if it
is in the GAC there is a field in the Assembly object that indicates that.
If you want to know if the assembly was supplied by Microsoft then you can
compare the public key token the assembly is signed with to that used by
Microsoft..you might want to include the ECMA key as well.

You could also compare the name of the assembly to see if it starts with
"System"

None of these are guarantees as these could all change in the future.
 
I ment the second option. Determining if the assembly was supplied by
Microsoft.
Thanks for your ideas, but I'm looking for a more general way. Something
that I can count on.

Elad
 
Back
Top