>But there is a larger question here:  If you're writing a design time
>reflection based tool[1], and you load an assembly by path
>(Assembly.LoadFrom) because your user's project info says to get that
>particular one.  How do you set things up so that any referenced
>assemblies will be correctly located by the system when needed?

Im not sure if youve come across this article yet

http://www.gotdotnet.com/team/clr/LoadFromIsolation.aspx

but it says:

"Recall that the directory from which you load an assembly using LoadFrom
is included in the list of directories in which the .Net Framework will
look for dependencies. For example, say that comp.dll has a static
reference to compdep.dll and both are deployed to the directory c:\x. When
you call LoadFrom on c:\x\comp.dll, c:\x will be searched when trying to
resolve comp.dlls reference to compdep.dll. This feature makes it very
convenient to deploy a LoadFromd assembly and all its dependencies in the
same directory.

However, it is important to note that the LoadFrom directory is searched
last. That is, after the standard locations like the application directory
and the GAC are searched. As such, there could be cases where one of your
assemblys dependencies gets resolved from a different location than you
expect."

Which is to say, if all the dependent assemblies are in the same
directory, or in the the GAC, then there should be no problem.  Of course
that doesnt explain what the issue is with System.ServiceProcess

-John

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to