DLL Path

  • Thread starter Thread starter jlnm
  • Start date Start date
J

jlnm

Not sure if this is the correct area, but nothing else was more
appropriate. I have class libraries that may or may not load dlls via
reflection. The definition of how to load these resides in a
file.config.xml (but not the dll). Because the libraries are
ubiquitous, they can be GACd (preferred) on controlled servers and
loaded locally on uncontrolled (such as hosting services for web).
The libraries are quite extensive but are broken out into necessary
packages only. Unfortunately when GACd, the FullyQualifiedName does
not indicate the real path of the dll where the file actually lives.
Henceforth, I cannot load the config file from the dll path. I DO NOT
want to load in the app config because these libraries are used in all
builds in some capacity. The $64M question, how do I get the REAL
path of the dll when it is GACd and running?
 
DLL assemblies are not designed to work with their own configuration files,
and you would be jumping through some ridiculous hoops to try to implement
this. My suggestion is, if the DLL needs to share its own configuration with
many programs, store it in the System registry.

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP
 
Back
Top