Gets the assembly whose dependency is being resolved.
Assembly: mscorlib (in mscorlib.dll)
The assembly that is returned by this property is an assembly that was unable to resolve the item specified by the Name property, because the item did not exist in that assembly, in any of its loaded dependencies, or in any dependencies the loader could find through probing.
For example, suppose the current assembly uses the Assembly.LoadFile method to load assembly A from a directory outside the probing path, in order to use class CA. Suppose further that class CA uses class CB, in assembly B, and that assembly A has a compile-time reference to assembly B, also located outside the probing path. When the current assembly attempts to instantiate CA, the loader attempts to resolve the reference to assembly B. However, because assembly A was loaded by using the Assembly.LoadFile method, the loader cannot resolve the dependency. If there is a handler for the AppDomain.AssemblyResolve event, the event is raised, and the property of the resulting ResolveEventArgs object contains assembly A, because assembly A is the assembly that is missing a dependency.
The semantics of the property vary, depending on how the requesting assembly was loaded:
Load context: The value of the property might be null. The load context is load-order independent, and the identity of the requesting assembly is not necessarily meaningful. A non-null example occurs when the Type.GetType method is called and the specified type is not known to the requesting assembly or any of its dependencies.
Load-from context: The property can be used as a probing hint, but the event handler should not get more than one request for a given assembly name.
No context (that is, the requesting assembly was loaded by using the Assembly.LoadFile method, or as a byte stream, or in mixed mode): The handler can use the property to load different implementations of the same assembly based on the identity of the requesting assembly.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.