Reputation: 4850
My particular question hasn't been answered before as far as I can tell:
I have two apps (possibly both winforms apps, but one of which may be a web app). They share the same config file settings. Currently each has to have a copy of the same file, meaning both config files have to be kept in sync.
I need a way to tell one app to use the entire config file of the other app. They will generally be in the same relative location (either the same folder, or sibling folders).
Can this be done, and if so how? It would be nice if the first config file could have nothing in it but some setting which effectively says "suck in the entire config file found at this place".
TIA.
Upvotes: 0
Views: 773
Reputation: 56697
I don't think this is possible out of the box. You may be able to extend the configuration classes to do that, but the most hassle-free way I'd choose is to put an XML file into a shared location and write some code (a DLL maybe) that can read the file and return the settings.
A good solution might be to use a typed dataset, which can be read from/written to XML directly and provides easy access to the values in database style.
Upvotes: 2