Export (0) Print
Expand All
Expand Minimize

Troubleshooting Exceptions: System.CannotUnloadAppDomainException

A CannotUnloadAppDomainException exception is thrown when there is an attempt to unload one of the following:

  • The default application domain, which must remain loaded throughout the lifetime of the application

  • An application domain with a running thread that cannot stop execution immediately

  • An application domain that has already been unloaded

Make sure you are not trying to unload the application domain that is the default, has a running thread, or that has already been unloaded.

Any of these conditions will cause this exception to be thrown. For more information, see Unload.

Community Additions

ADD
Show:
© 2014 Microsoft