10

I know there is an easy way to move any "standard" config section to external file i.e.

<appSettings file="myFile.config">

but what about a custom ConfigurationSection?

<configSections>
    <section name="someName" type="Namespace.SomeNameConfiguration" requirePermission="false" />
</configSections>

....

<someName>
  < bla bla bla ......
</someName>

Is there any similar way?

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
Stefano.net
  • 1,078
  • 1
  • 11
  • 25
  • Possible duplicate of [Moving a custom configuration group to a separate file](http://stackoverflow.com/questions/1562679/moving-a-custom-configuration-group-to-a-separate-file) – sirdank Aug 04 '16 at 18:02

1 Answers1

15

You can use

<somename configSource="myfile.config"/>

However unlike appSettings file=..., you must put the entire section in the external file: there is no merging.

Joe
  • 122,218
  • 32
  • 205
  • 338