What is the counterpart of libpath in c#(.NET) as in Java?

  • Thread starter Thread starter Bill Park
  • Start date Start date
B

Bill Park

I am trying to access .net assemblies not in the current program
directories. Those assemblies are not in GAC. In Java, I just have to make
sure those classes(jar files) are in the directories of libpath.Do we have
something similar in .NET? If not, how can I access assemblies not in the
current directory and not in GAC?

Thanks for your help.
 
You could use the Reflection class to dynamically load the class at runtime.
This would involve knowing the physical location of the assembly though.
You could store the info in a config file however.

-ZD
 
As far as i know, the assembly must use strong-naming.
A private assembly can only be deployed private, that means in the
application directory. If you want to use another directory (not appbase
and not GAC) you must use strong-naming.

HTH
Reinhold
 
I am trying to access .net assemblies not in the current program
directories. Those assemblies are not in GAC. In Java, I just have to
make sure those classes(jar files) are in the directories of
libpath.Do we have something similar in .NET? If not, how can I access
assemblies not in the current directory and not in GAC?

Thanks for your help.

All that work to eliminate DLL hell and you want to throw it out the
window.

I'm speechless.

Mark
 
The way you would do that is by using the following config

<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<probing privatePath="bin"/>

</assemblyBinding>
</runtime>
</configuration>



by mentioning your probing element and a path you'll have access to the
directory
Thanks
 
Back
Top