DLL Path

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?
 
K

Kevin Spencer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top