I am developping a modular application using Prism and I want each module to have some specific settings. I searched on the net for this common issue but I didn't find a "clear" solution.
I was thinking of two ways to do it:
- In the intialize fonction of each module, read a section (GetSection) of the app.config file using the
ConfigurationManager class. The only thing that bothers me with this approach is: when a new module is added to the application, the configuration file should be changed in order to add a new section. It doesn't seem as flexible as it should
-Have a separate configuration file for each module and read it using the
ConfigurationManager.OpenExeConfiguration method. Thus, when a new module is deployed, it comes with its configuration file (same name as the module).
I have a preference for the second approach but it may not be the good one.
What are your thoughts on all this?