How does a component determine what other internally referenced component to use
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngfreeforall' list.


Bill Bassler
Question 1: I'm trying to get a handle on the "order of usage" that a .Net
component uses to determine what internally referenced .dll to load at
run-time.

If I had component A that referenced another component B, and I built
component A against component B while they were both in the same physical
directory .... I then install component B into the GAC while leaving
component B's .dll in the same physical directory.

Which actual component B would be loaded at run-time? The one in the same
directory or the one in the GAC.
i.e. What's the usage order?

What the above in general in mind ....
Question 2: In development, what's the best approach to building a
project/component against an internally referenced component (e.g. a
third-party component) that will reside in the GAC in a production
environment?

As the installation in the GAC doesn't equate to a physical location, my
assumption would be to install and reference the (e.g. third-party
component) locally (bin) and assume that in production the .Net run-time
will not find the .dll locally (private) and eventually search for and find
it in the GAC??

Is there a way to reference/build against a component installed in the GAC
at build time. There doesn't appear to be.

In general, how do you approach this situation.

Reply to this message...
 
    
Steve Mark
Regarding question 1: you can answer this yourself by building a
component that returns a value (say 1) and save it away, then change the
return value to something else, (say 2) and build and GAC that, then
setup the components (each with same version and sn) as you have
described and see what value you get back.

[Original message clipped]

Reply to this message...
 
    
Barry J. Akester
I found this in the VS.net help...

ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconhowruntimelocatesassemblie
s.htm

__________________________________________________=20

Barry Akester=20
Systems Analyst / Programmer=20
Global Aerospace Underwriting Managers (Canada) Limited=20

Phone: ( 905 ) 948-7073=20
Fax: ( 905 ) 479-0751=20

-----Original Message-----
From: Bill Bassler [mailto:Click here to reveal e-mail address]
Sent: Monday, August 19, 2002 9:30 AM
To: aspngfreeforall
Subject: [aspngfreeforall] How does a component determine what other
internally referenced component to use

Question 1: I'm trying to get a handle on the "order of usage" that a
.Net
component uses to determine what internally referenced .dll to load at
run-time.

If I had component A that referenced another component B, and I built
component A against component B while they were both in the same
physical
directory .... I then install component B into the GAC while leaving
component B's .dll in the same physical directory.

Which actual component B would be loaded at run-time? The one in the
same
directory or the one in the GAC.
i.e. What's the usage order?

What the above in general in mind ....
Question 2: In development, what's the best approach to building a
project/component against an internally referenced component (e.g. a
third-party component) that will reside in the GAC in a production
environment?

As the installation in the GAC doesn't equate to a physical location, my
assumption would be to install and reference the (e.g. third-party
component) locally (bin) and assume that in production the .Net run-time
will not find the .dll locally (private) and eventually search for and
find
it in the GAC??

Is there a way to reference/build against a component installed in the
GAC
at build time. There doesn't appear to be.

In general, how do you approach this situation.

| ASP.net DOCS =3D http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/aspngfreeforall =3D JOIN/QUIT
| news://ls.asplists.com =3D NEWSGROUP

Reply to this message...
 
    
Alex Lowe
More information here
(http://www.aspnetpro.com/features/2002/06/asp200206jn_f/asp200206jn_f.a
sp). I think you will find that help documentation to be WinForms (.exe)
specific.

Alex - AspFriends.com Moderation Team
Microsoft MVP - ASP.NET

***********************************************************
Translate C# code to VB.NET code at
http://aspalliance.com/aldotnet/examples/translate.aspx
***********************************************************

[Original message clipped]

Reply to this message...
 
 




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com