all groups > dotnet clr > june 2004 >
You're in the

dotnet clr

group:

Assembly path question?


Assembly path question? Ken Varn
6/18/2004 3:13:44 PM
dotnet clr:
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.

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

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

Re: Assembly path question? David Levine
6/19/2004 5:15:30 AM
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.

[quoted text, click to view]

RE: Assembly path question? janinez NO[at]SPAM online.microsoft.com
6/23/2004 5:21:48 PM
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


--------------------
[quoted text, click to view]
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11
.phx.gbl
[quoted text, click to view]


--

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.
AddThis Social Bookmark Button