Microsoft KB Archive/821624

= Help topics for the AppDomain.Load method and for the Assembly.Load method are not complete =

Article ID: 821624

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft Visual Studio 2005 Standard Edition
 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Academic Edition

-



SUMMARY
In the Microsoft .NET Framework Class Library documentation, the following help topics are not complete.
 * AppDomain.Load Method (AssemblyName)
 * AppDomain.Load Method (AssemblyName, Evidence)
 * Assembly.Load Method (AssemblyName)
 * Assembly.Load Method (AssemblyName, Evidence)

For more information, visit the following Microsoft Web sites:

http://msdn2.microsoft.com/en-us/library/Aa310667(VS.71).aspx

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemappdomainclassloadtopic4.asp

http://msdn2.microsoft.com/en-us/library/Aa329933(VS.71).aspx

http://msdn2.microsoft.com/en-us/library/Aa329936(VS.71).aspx



MORE INFORMATION
The existing help topics should also include the following information:

To load an assembly, start any one of the four methods that appear in the &quot;Summary&quot; section. While any of these methods is starting, you pass a reference to an AssemblyName object by using the assemblyRef parameter. Before you pass the assemblyRef parameter to any of the four methods, you can set the CultureInfo, KeyPair, Name, and Version properties of your AssemblyName object. Additionally, you can set the CodeBase property of your AssemblyName object.

In this scenario, the Name property and the CodeBase property might not be consistent with each other. To overcome any resultant differences, the .NET Framework first tries to locate the specified assembly by using the Name property. If this search is successful, the .NET Framework loads the located assembly. If the search is not successful, the .NET Framework tries to locate the specified assembly by using the CodeBase property. If the new search is also not successful, you receive a FileNotFoundException error message that contains the following information:

File or assembly name, or one of its dependencies, was not found.

Note  is the value of the Name property of your AssemblyName object.

If the search for the specified assembly is successful, the .NET Framework verifies whether the Name property of the located assembly matches the Name property of your AssemblyName object. If the properties match, the .NET Framework loads the located assembly. If the properties do not match, you receive a FileNotFoundException error message that contains the following information:

The located assembly's manifest definition with name ' ' does not match the assembly reference.

