Help topics for the AppDomain.Load method and for the Assembly.Load method are not complete (821624)



The information in this article 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 Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Professional Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • 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:

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 "Summary" 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 YourAssembly, or one of its dependencies, was not found.
Note YourAssembly 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 'YourAssembly' does not match the assembly reference.

Modification Type:MajorLast Reviewed:3/3/2006
Keywords:kbvs2005applies kbvs2005swept kbvs2002sp1sweep kbManaged kbDocs kbSecurity kbNameSpace kbProgramming kbdocerr kbBug KB821624 kbAudDeveloper