Welcome to MSDN Blogs Sign in | Join | Help

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.

Published Tuesday, December 20, 2005 8:00 AM by junfeng
Filed under: ,

Comments

# re: Parent Assembly Hint

Tuesday, December 20, 2005 4:09 PM by Jamie Cansdale
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.

# re: Parent Assembly Hint

Tuesday, December 20, 2005 10:50 PM by junfeng
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.
New Comments to this post are disabled
 
Page view tracker