Parent Assembly Hint
When an assembly load is request, the assembly that requests the assembly load is called Parent Assembly Hint.
You can see the parent assembly hint from fusion binding log:
=== Pre-bind state information ===
LOG: User = ...
LOG: DisplayName = System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (Fully-specified)
LOG: Appbase = file:///d:/tools/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = loader.exe
Calling assembly : loader, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.
===
Parent Assembly Hint is only used only when the parent assembly is in LoadFrom context(Assemblies returned by Assembly.LoadFrom, or parent assembly is in LoadFrom context).
If the parent assembly is in LoadFrom, fusion will probe the assembly in the parent assembly’s directory, in addition to the application base.
Comments
- Anonymous
December 20, 2005
Is this new in .NET 2.0? It makes a lot of sense, but I've never seen it documented before. I'm actually supprised I haven't noticed this behavour.
Thanks, Jamie. - Anonymous
December 20, 2005
It is there since v1.0.
It is documented here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp
you just need to read it carefully.