473,385 Members | 1,337 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,385 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 26141
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.