Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / June 2004

Tip: Looking for answers? Try searching our database.

Assembly path question?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Varn - 18 Jun 2004 20:13 GMT
Is there anyway to locate an assembly from a path that is not relative to
the current path without using the GAC?

For instance.  I have a .net application in C:\DirA\DirB that needs to use
an assembly class in C:\DirC.  Is there a way to have the exe find the
assembly without using the GAC?  I read about probing, in the configuration
file, but it states that it can only be specified in terms of relative path.

Signature

-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

David Levine - 19 Jun 2004 11:15 GMT
You can manually load the assembly yourself by hooking the appdomain
AssemblyResolve event, using LoadFrom or LoadFile on the assembly in the
other directory, and returning a reference to it. You should be able to
easily locate some sample code that shows how to do this.

> Is there anyway to locate an assembly from a path that is not relative to
> the current path without using the GAC?
[quoted text clipped - 3 lines]
> assembly without using the GAC?  I read about probing, in the configuration
> file, but it states that it can only be specified in terms of relative path.
Janine Zhang[MSFT] - 23 Jun 2004 18:21 GMT
You can use <CodeBase> setting in the application configuration file.  If
the assembly has a strong name, the codebase setting can be anywhere on the
local intranet or the Internet. If the assembly is a private assembly, the
codebase setting must be a path relative to the application's directory.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht
ml/gngrfCodeBase.asp

--------------------
>Reply-To: "Ken Varn" <nospam>
>From: "Ken Varn" <nospam>
[quoted text clipped - 10 lines]
>NNTP-Posting-Host: 204.151.249.23
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10930
>X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 6 lines]
>assembly without using the GAC?  I read about probing, in the configuration
>file, but it states that it can only be specified in terms of relative path.

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note:  For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.