a utility dll's own .config file possible?

J

Jiho Han

If there is a dll that my asp pages uses but is in a separate assembly, can
I define a separate config for it and will it read?

For example, if I have a MyLibrary.dll and I define a MyLibrary.dll.config,
will objects in MyLibrary.dll have access to the .config?

Thanks
 
P

Peter Bromberg [C# MVP]

No, not unless the assembly is loaded by an executable that reads its own
appname.exe.config whereupon the appSettings (for example) will be available
to the dll.
You can have the dll read its own config file programmatically of course.
HTH
--Peter
 
J

Jiho Han

I think I am going to be ending up doing exactly that. I was just
wanting to find a way if possible to not have to implement my own
config(and its format). I'd use web.config but I am developing an
add-on to an already existing application and I'd like to stay away from
mucking with web.config if possible.

If you have any suggestions as to how to go about it, I'd appreciate
them. I'm thinking about generating a xsd and create a class using
xsd.exe which I am going to use xml serialization feature. I guess I
should be using a validating reader though...

Thanks all.
Jiho
 

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

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top