Is it good design to have a separate config file for you dll?
I noticed when the dll is invoked from the application, it doesn't read it.
what the dll is able to read is the machine.config file.
Making a dll dependent on a config file is not ideal and can become a real pain when you start unit testing or moving it about.
A better solution is pass any values from config settings in from the calling application e.g. WebApp or Windows App etc. and store any settings required in the app or web config.
It looks like you have two separate questions.
The users of your program aren't going to think in terms of configuring both your application and any associated DLLs. It seems to me that having a separate config file for a DLL might be confusing for users. It's not bad design to have a separate config file, but it's not necessarily good design either.
DLLs certainly can read files. Check that the DLL is reading the file from the correct location (check the current working directory, for example).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With