tags:

views:

67

answers:

3

Hi. I have console app "A" that references another console app "B". "B" app has its own configuration file. When I launch project "A", the application fails, because app "B" cannot configure its components, since it uses the configuration of app "A". How to get around this problem? I want that project "B" to source its own configuration file.

+1  A: 

The executing assembly must have all configuration information in its configuration file. You will have to import all settings from "B" into the configuration file of application "A".

Andrew Hare
Ok.. I thought that there could be some other approach.
Markus
+1  A: 

You can copy the relevant XML sections from B.exe.config to A.exe.config.

A.exe will always read from A.exe.config, but if the relevant configuration sections from B.exe.config are available in A.exe.config, it should still work.

You can merge configuration settings as needed.

Mark Seemann
+1  A: 

You'll have to put the relevant sections from B's configuration file into A's configuration file.

jrummell