C# Reflection: Get *all* active assemblies in a solution?

Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();

This will get all of the loaded assemblies in the current AppDomain.

As noted in the comments, it’s possible to spawn multiple AppDomains, in which case each can have its own assemblies. The immediate advantage to doing so is that you can unload Assemblies by unloading the containing AppDomain.

Leave a Comment