AssemblyLoadContext.Resolving Event

Definition

Occurs when the resolution of an assembly fails when attempting to load into this assembly load context.

public:
 event Func<System::Runtime::Loader::AssemblyLoadContext ^, System::Reflection::AssemblyName ^, System::Reflection::Assembly ^> ^ Resolving;
public event Func<System.Runtime.Loader.AssemblyLoadContext,System.Reflection.AssemblyName,System.Reflection.Assembly?>? Resolving;
public event Func<System.Runtime.Loader.AssemblyLoadContext,System.Reflection.AssemblyName,System.Reflection.Assembly> Resolving;
member this.Resolving : Func<System.Runtime.Loader.AssemblyLoadContext, System.Reflection.AssemblyName, System.Reflection.Assembly> 
Public Custom Event Resolving As Func(Of AssemblyLoadContext, AssemblyName, Assembly) 
Public Event Resolving As Func(Of AssemblyLoadContext, AssemblyName, Assembly) 

Event Type

Remarks

It is the responsibility of the handler for this event to return the assembly that is specified, or to return null if the assembly is not recognized.

Important

If more than one event handler is registered for this event, the event handlers are called in order until an event handler returns a value that isn't null. Subsequent event handlers are ignored.

For more information about handling events, see Handle and raise events.

It is noteworthy that a handler can be added for this event on any AssemblyLoadContext, including the default context.

Applies to

See also