473,387 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Hintpath vs referencepath?

Hello,

I'm trying to get a grip on how .NET handles finding dependent assemblies.
The "Reference Path" property that can be found in the IDE's project
properties dialog seems to correspond to the ReferencePath attribute of the
settings element of the myproj.vbproj.user file. There also is a "hintpath"
attribute for each reference listed in the myproj.vbproj file:

<Reference
Name = "ClassLibrary1"
AssemblyName = "ClassLibrary1"
HintPath = "..\..\ClassLibrary1.dll"
Private = "False"
/>

What is the relationship between the hintpath and the referencepath? These
both seem to be only used at buildtime. Is that correct?

If I set the "copy local" setting to false of an assembly reference for an
assembly that's not in the GAC, whenever the code runs and tries to access
that assembly, a "System.IO.FileNotFoundException" is thrown. Is there no way
to have this work with the copy local setting set to false? Is there a place
to specify paths that the .NET loader should search at runtime for referenced
assemblys? Preferablly and application specific option, not a system wide one.

Thanks!

-Ben
Sep 26 '05 #1
3 26142
Hi Ben,

Welcome to MSDN newsgroup.
Regarding on the quesiton of the VS.NET're project assembly reference
setting and ..NET's runtime assembly locating, here are some of my
understandings:

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 "Hit 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.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Hintpath vs referencepath?
| thread-index: AcXCsdELyAVsj/L6RR2ph9HIcFaPpA==
| X-WBNR-Posting-Host: 129.33.1.37
| From: =?Utf-8?B?QmVuIFIu?= <be**@newsgroup.nospam>
| Subject: Hintpath vs referencepath?
| Date: Mon, 26 Sep 2005 08:49:02 -0700
| Lines: 28
| Message-ID: <E7**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:50694
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Hello,
|
| I'm trying to get a grip on how .NET handles finding dependent
assemblies.
| The "Reference Path" property that can be found in the IDE's project
| properties dialog seems to correspond to the ReferencePath attribute of
the
| settings element of the myproj.vbproj.user file. There also is a
"hintpath"
| attribute for each reference listed in the myproj.vbproj file:
|
| <Reference
| Name = "ClassLibrary1"
| AssemblyName = "ClassLibrary1"
| HintPath = "..\..\ClassLibrary1.dll"
| Private = "False"
| />
|
| What is the relationship between the hintpath and the referencepath?
These
| both seem to be only used at buildtime. Is that correct?
|
| If I set the "copy local" setting to false of an assembly reference for
an
| assembly that's not in the GAC, whenever the code runs and tries to
access
| that assembly, a "System.IO.FileNotFoundException" is thrown. Is there no
way
| to have this work with the copy local setting set to false? Is there a
place
| to specify paths that the .NET loader should search at runtime for
referenced
| assemblys? Preferablly and application specific option, not a system wide
one.
|
| Thanks!
|
| -Ben
|

Sep 27 '05 #2
Thank you for the clarification, Steven. Your info was very useful!

-Ben

"Steven Cheng[MSFT]" wrote:
Hi Ben,

Welcome to MSDN newsgroup.
Regarding on the quesiton of the VS.NET're project assembly reference
setting and ..NET's runtime assembly locating, here are some of my
understandings:

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 "Hit 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.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Hintpath vs referencepath?
| thread-index: AcXCsdELyAVsj/L6RR2ph9HIcFaPpA==
| X-WBNR-Posting-Host: 129.33.1.37
| From: =?Utf-8?B?QmVuIFIu?= <be**@newsgroup.nospam>
| Subject: Hintpath vs referencepath?
| Date: Mon, 26 Sep 2005 08:49:02 -0700
| Lines: 28
| Message-ID: <E7**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:50694
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Hello,
|
| I'm trying to get a grip on how .NET handles finding dependent
assemblies.
| The "Reference Path" property that can be found in the IDE's project
| properties dialog seems to correspond to the ReferencePath attribute of
the
| settings element of the myproj.vbproj.user file. There also is a
"hintpath"
| attribute for each reference listed in the myproj.vbproj file:
|
| <Reference
| Name = "ClassLibrary1"
| AssemblyName = "ClassLibrary1"
| HintPath = "..\..\ClassLibrary1.dll"
| Private = "False"
| />
|
| What is the relationship between the hintpath and the referencepath?
These
| both seem to be only used at buildtime. Is that correct?
|
| If I set the "copy local" setting to false of an assembly reference for
an
| assembly that's not in the GAC, whenever the code runs and tries to
access
| that assembly, a "System.IO.FileNotFoundException" is thrown. Is there no
way
| to have this work with the copy local setting set to false? Is there a
place
| to specify paths that the .NET loader should search at runtime for
referenced
| assemblys? Preferablly and application specific option, not a system wide
one.
|
| Thanks!
|
| -Ben
|

Sep 28 '05 #3
You're welcome Ben,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Hintpath vs referencepath?
| thread-index: AcXERHAhj0K7y4NpRh2QIqZvSDexOA==
| X-WBNR-Posting-Host: 129.33.1.37
| From: =?Utf-8?B?QmVuIFIu?= <be**@newsgroup.nospam>
| References: <E7**********************************@microsoft.co m>
<s7*************@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: Hintpath vs referencepath?
| Date: Wed, 28 Sep 2005 08:51:06 -0700
| Lines: 122
| Message-ID: <0B**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.general
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:50883
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thank you for the clarification, Steven. Your info was very useful!
|
| -Ben
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Ben,
| >
| > Welcome to MSDN newsgroup.
| > Regarding on the quesiton of the VS.NET're project assembly reference
| > setting and ..NET's runtime assembly locating, here are some of my
| > understandings:
| >
| > 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 "Hit 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.
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| >
| >
| >
| >
| > --------------------
| > | Thread-Topic: Hintpath vs referencepath?
| > | thread-index: AcXCsdELyAVsj/L6RR2ph9HIcFaPpA==
| > | X-WBNR-Posting-Host: 129.33.1.37
| > | From: =?Utf-8?B?QmVuIFIu?= <be**@newsgroup.nospam>
| > | Subject: Hintpath vs referencepath?
| > | Date: Mon, 26 Sep 2005 08:49:02 -0700
| > | Lines: 28
| > | Message-ID: <E7**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.general
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.general:50694
| > | X-Tomcat-NG: microsoft.public.dotnet.general
| > |
| > | Hello,
| > |
| > | I'm trying to get a grip on how .NET handles finding dependent
| > assemblies.
| > | The "Reference Path" property that can be found in the IDE's project
| > | properties dialog seems to correspond to the ReferencePath attribute
of
| > the
| > | settings element of the myproj.vbproj.user file. There also is a
| > "hintpath"
| > | attribute for each reference listed in the myproj.vbproj file:
| > |
| > | <Reference
| > | Name = "ClassLibrary1"
| > | AssemblyName = "ClassLibrary1"
| > | HintPath = "..\..\ClassLibrary1.dll"
| > | Private = "False"
| > | />
| > |
| > | What is the relationship between the hintpath and the referencepath?
| > These
| > | both seem to be only used at buildtime. Is that correct?
| > |
| > | If I set the "copy local" setting to false of an assembly reference
for
| > an
| > | assembly that's not in the GAC, whenever the code runs and tries to
| > access
| > | that assembly, a "System.IO.FileNotFoundException" is thrown. Is
there no
| > way
| > | to have this work with the copy local setting set to false? Is there
a
| > place
| > | to specify paths that the .NET loader should search at runtime for
| > referenced
| > | assemblys? Preferablly and application specific option, not a system
wide
| > one.
| > |
| > | Thanks!
| > |
| > | -Ben
| > |
| >
| >
|

Sep 29 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BuddyWork | last post by:
Hello, If you copy the source code from this post into seperate files as stated, and compile the code. Now to reproduce run the code in debug. 1. Press the Client button. 2. Put the cursor...
4
by: Richard | last post by:
We are distributing a VS2003 solution to our customers that includes a .NET assembly (dll file) and a sample project for how to use the dll. The customer can then customize the sample or add a new...
9
by: Invalidlastname | last post by:
Hi, We developed some assemblies which use EnterpriseServices queued components. In order to use EnterpriseServices, these assemblies need to be installed into GAC. I used the pre-build and...
3
by: Ben R. | last post by:
Hello, I'm trying to get a grip on how .NET handles finding dependent assemblies. The "Reference Path" property that can be found in the IDE's project properties dialog seems to correspond to...
5
by: Titeuf | last post by:
ok I start programming mobile application with VB.NET (VS 2005) I am interested work with Sqlce Also I look for add reference in my project I search "System.Data.SqlServerCe" but not found....
1
by: ritesh.noronha | last post by:
Hi Group, I have a question regarding the commandline options of msbuild. I am currently using msbuild to build projects using the existing solution files. These solution files have references...
10
by: WT | last post by:
Hello, I have been publishing my web site many times to the remote where resides my final web site. Everything was ok, but to-day, without any configuration change, vs doesn't copy final files...
0
by: guy | last post by:
VB2003 ASP.NET I have just loaded up a solution from VSS using Get Latest. It is the first time the solution has been loaded on this box. A build fails to resolve an refernces with a hintPath...
6
by: =?Utf-8?B?SHVnaA==?= | last post by:
Hi there We are trying to build a C sharp solution in Visual Studio 2005 Professional. We have a number of other assemblies, that do not form part of the solution. Assemblies that do form...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.