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
Associated Tips
- 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.
See Also
Tasks
How to: Find Out More About an Exception with the Exception Assistant