How to combine multiple app.config files at runtime in .net?

With web applications, multiple web.config files are combined based on a directory hierarchy. Is there a way to define a custom hierarchy for common Windows applications? The functionality to merge the config file already exists, so I don't understand why this is not possible.

The current hierarchy user.config -> roaming.config -> app.config -> machine.config

. And there are huge restrictions on what can be used in user.config and roaming.config.

I would like to have the following hierarchy: additional2.config -> additional1config -> app.config -> machine.config

or as many config files as I want, resulting in one object Configuration

that I can read. Otherwise, I would have to search for each additional configuration manually.

configSource

not enough for me, because it could be that additional config files contain new config sections.

+3
.net app-config


source to share


No one has answered this question yet

Check out similar questions:

1786
How can I create an Excel file (.XLS and .XLSX) in C # without installing Microsoft Office?
890
How can I get the app path in a .NET console app?
744
Reading settings from app.config or web.config in .net
73
.NET configSource config files outside the application directory folder
15
Merging custom configuration sections at runtime in .NET.
6
How to do hierarchical configuration in .NET app.config
3
Merge.net configuration files
2
Stacking app.config files, multi-level nesting doesn't seem to work
1
.Net - How to override settings and custom sections in a mapped config file?
1
How to combine app.config into web.config for build



All Articles
Loading...
X
Show
Funny
Dev
Pics