Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Every .NET application has dependencies. Even the simple hello world
app has dependencies on portions of the .NET class libraries.
Understanding the default assembly loading logic in .NET can help you troubleshoot typical deployment issues.
In some applications, dependencies are dynamically determined at run time. In these situations, it's critical to understand how managed assemblies and unmanaged dependencies are loaded.
The AssemblyLoadContext API is central to the .NET loading design. The Understanding AssemblyLoadContext article provides a conceptual overview of the design.
The loading algorithm details are covered briefly in several articles:
The tutorial Create a .NET 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.
The How to use and debug assembly unloadability in .NET article is a step-by-step tutorial. It shows how to load a .NET application, execute it, and then unload it. The article also provides debugging tips.
The Collect detailed assembly loading information article describes how to collect detailed information about managed assembly loading in the runtime. It uses the dotnet-trace tool to capture assembly loader events in a trace of a running process.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Create a new .NET project and work with package dependencies - Training
Create a .NET project and learn to add packages and manage package dependencies in your project. Use the .NET Core CLI and NuGet registry to add libraries and tools to your C# applications through Visual Studio Code.