Initialize library on Assembly load
I have a .net library dll that acts like a functional library. There are a bunch of static types along with static methods. There is some initialization code that I need to run to set up the library ready for use. When the assembly gets loaded is there a way to ensure that a particular method is run? Something like AppDomain.AssemblyLoad but called automatically from the assembly itself. I was thinking that maybe there is something like an AssemblyAttribute that could be used? At the moment I have this initialization code in a static constructor but as this is a library with many entry points