AppDomain.Load Method (AssemblyName)
Assembly: mscorlib (in mscorlib.dll)
An object that describes the assembly to load.
Return ValueThe loaded assembly.
assemblyRef is a null reference (Nothing in Visual Basic).
assemblyRef is not found.
assemblyRef is not a valid assembly.
Operations are attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
This method should only be used to load an assembly into the current application domain. This method is defined for interoperability callers who cannot call the static Load method.
An attempt to call Load on a target application domain that is not the current application domain will result in a successful load of the assembly in the target application domain. Since an Assembly is not MarshalByRefObject, when this method attempts to return the Assembly for the loaded assembly to the current application domain, the common language runtime will try to load the assembly into the current application domain and the load might fail. The assembly that is loaded into the current application domain might be different from the assembly that was loaded first if the path settings for the two application domains are different.
If both the AssemblyName.Name property and the AssemblyName.CodeBase property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the Assembly.FullName property). If the file is not found, the CodeBase property is used to search for the assembly. If the assembly is found using CodeBase, the display name is matched against the assembly. If the match fails, a FileLoadException is thrown.
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.