C#: HintPath Vs Referencepath

http://bytes.com/topic/net/answers/164530-hintpath-vs-referencepath

As for the "Referece Path" or "Hint Path" in the VS.NET project’s setting
files, they’re all design-time /dev-time setting used by the IDE. As
described in the IDE’s help doc, "Reference Path" are used by the VS.NET
IDE to load all the assembliy references when the Project is loaded into
the VS.NET IDE.

And the "Hnit Path" is mainly used for building time, when
the IDE will build the project, it’ll locate the assemblies which is
required to link through the "Hint Path".
Anyway, they’re all internally
used by the VS.NET IDE, and is possibly to change in sequential version and
they have nothing to do with the .NET framework CLR’s runtime assembly
locating.

For .net framework CLR’s runtime assembly locating, it’ll follow a well
defined steps, generally, it’ll check GAC (if strong-named) first, then,
codebase settting , and private path probing. Here is a MSDN reference
which describing the .NET framework’s runtime assembly locating:

#How the Runtime Locates Assemblies
http://msdn.microsoft.com/library/en…untimelocatesa
ssemblies.asp?frame=true

In addition, if you have interests, I’d recommend you the following books:

Don Box’s "Essential dotNet"
and Steven Pratschner’s "Customzing the Microsoft .NET Framework CLR"

which has detailed description on .NET runtime’s assembly binding and
loading.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s