J
JohnH
Hi,
Does anyone know why the DomainUnload is not raised for the default
AppDomain.
I'm trying to get some shutdown code in a dynamically loaded assembly
called before the application shuts down.
I tried adding a handler for the DomainUnload event to the
AppDomain.CurrentDomain, but this does not get raised because it is the
default Domain.
Can anyone suggest an alternative?
I can't use a Finalizer as I have no control over the order in which
objects are disposed and could result in the shutdown code failing.
Also the hosting application has no reference to the loaded assembly.
Basically, I need a way for the assembly to know when it is about to be
unloaded.
Thanks,
John
Does anyone know why the DomainUnload is not raised for the default
AppDomain.
I'm trying to get some shutdown code in a dynamically loaded assembly
called before the application shuts down.
I tried adding a handler for the DomainUnload event to the
AppDomain.CurrentDomain, but this does not get raised because it is the
default Domain.
Can anyone suggest an alternative?
I can't use a Finalizer as I have no control over the order in which
objects are disposed and could result in the shutdown code failing.
Also the hosting application has no reference to the loaded assembly.
Basically, I need a way for the assembly to know when it is about to be
unloaded.
Thanks,
John