Dependency loading in .NET Core
Every .NET Core application has dependencies. Even the simple
hello world app has dependencies on portions of the .NET Core class libraries.
Understanding .NET Core default assembly loading logic can help understanding and debugging typical deployment issues.
In some applications, dependencies are dynamically determined at runtime. In these situations, it's critical to understand how managed assemblies and unmanaged dependencies are loaded.
The loading algorithm details are covered briefly in several articles:
- Managed assembly loading algorithm
- Satellite assembly loading algorithm
- Unmanaged (native) library loading algorithm
- Default probing
Create a .NET Core application with plugins
The tutorial Create a .NET Core application with plugins describes how to create a custom AssemblyLoadContext. It uses an AssemblyDependencyResolver to resolve the dependencies of the plugin. The tutorial correctly isolates the plugin's dependencies from the hosting application.
How to use and debug assembly unloadability in .NET Core
The How to use and debug assembly unloadability in .NET Core article is a step-by-step tutorial. It shows how to load a .NET Core application, execute, and then unload it. The article also provides debugging tips.