T
Tao
hi.. group,
A wired question about FileSystemWatcher and Unload an AppDomain.
I have a class A which creates class B. When B is created, B loads an
AppDomain and execute some functions on the load AppDomain.
B monitors disk to see if some files chang. If some file changes, B will try
to unload the AppDomain it loaded before.
Problem is the AppDomain.Unload never returns if it is called in
FileSystemWatcher event handler, it does not give exception either. The
AppDomain does not get unloaded.
I tried to unload after the function calls, unload works fine. Only in the
FileSystemWatcher, the AppDomain stucks and no exception, debug cursor
disappears.
It is really wired.
Thanks
A wired question about FileSystemWatcher and Unload an AppDomain.
I have a class A which creates class B. When B is created, B loads an
AppDomain and execute some functions on the load AppDomain.
B monitors disk to see if some files chang. If some file changes, B will try
to unload the AppDomain it loaded before.
Problem is the AppDomain.Unload never returns if it is called in
FileSystemWatcher event handler, it does not give exception either. The
AppDomain does not get unloaded.
I tried to unload after the function calls, unload works fine. Only in the
FileSystemWatcher, the AppDomain stucks and no exception, debug cursor
disappears.
It is really wired.
Thanks