Occurs when the resolution of a type fails.
Assembly: mscorlib (in mscorlib.dll)
The event occurs when the common language runtime is unable to determine the assembly that can create the requested type. This can occur if the type is defined in a dynamic assembly, or the type is not defined in a dynamic assembly but the runtime does not know which assembly the type is defined in. The latter situation can occur when Type.GetType is called with a type name that is not qualified with the assembly name.
The ResolveEventHandler for this event can attempt to locate and create the type.
However, the event does not occur if the runtime knows it is not possible to find a type in certain assemblies. For example, this event does not occur if the type is not found in a static assembly because the runtime knows types cannot be added dynamically to static assemblies.
Beginning with the .NET Framework version 4, the ResolveEventArgs.RequestingAssembly property contains the assembly that requested the type. For more information, see ResolveEventArgs.RequestingAssembly.
To register an event handler for this event, you must have the required permissions, or a SecurityException is thrown.
For more information about handling events, see Consuming Events.
The following sample demonstrates the event.
For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see Assembly Names.
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.