Is there any way to inherit settings in the .config file from a subassembly?
Example:
- Imagine I have an assembly .NET that does something like connect to a database, or a remote WCF service. This assembly is called “Connect.dll”, and its config file is “Connect.dll.config”.
- This sub assembly is called from the main program, “main.exe”, its config file is “main.exe.config”.
- Is there some way to import the settings from “connect.dll.config” into “main.config”, without having to copy the appropriate .xml lines in in by hand?
Unfortunately, no. There is however possible to load configuration from the “Connect.dll.config” manually using the ConfigurationManager API.