What determines when and if an assembly gets loaded into the AppDomain.
I guess I am trying to understand if:
- I am guaranteed that all project referenced assemblies will be
loaded at the start of my application.
- If not when exactly do
they get loaded? Is it going to be the first time I use a
class/function from that assembly?
- Is there a way to tell at
compile time if an assembly must be loaded first, before execution
of the first line in my code? (I know I can use reflection, but I
want to know if I can configure this at compile time)
- Assuming I
can control when an assembly gets loaded, what about the dependent
assembly? Can I tell the execution to only load up to 1st/2nd degree
and let the rest be loaded dynamically?