I need to write a static List to a text file when a DLL is unloaded. I've tried doing this on AppDomain.CurrentDomain.DomainUnload but it crashes with the error "DefaultDataCollection failed: 0x8007001f".
What is the best way to do this?
Thanks,
Joe
0x8007001f
That's a WIN32 error (the 7 in the middle is FACILITY_WIN32
): ERROR_GEN_FAILURE
:
A device attached to the system is not functioning.
So you need to look at the exception type and stack trace to get more details of what is failing.
AppDomain.CurrentDomain.DomainUnload
but remember the documentation has the caveat:
This event is never raised in the default application domain.
User contributions licensed under CC BY-SA 3.0