Joda
Joda

Reputation: 12886

Programatically adding sections to the configuration read from app.config

I am working on a component/assembly that is to be distributed to other developers and included in their systems.

In order to minimize the work they have to do, all configuration is done in a seperate file (my.config).

My current problem is that a library I am using requires configuration to be added to the app.config file of the application. I have no way of modifying this, so that it reads my custom config file.

Is there any way to add a section/setting to the current config, so that it behaves as if it was read from the app.config?

I can add to the app.config, so it must work at runtime only.

Thanks, Jonas

Upvotes: 0

Views: 942

Answers (1)

Assaf Lavie
Assaf Lavie

Reputation: 75973

I don't think you can update the configuration without changing the underlying file. It's a read-only thing.

Upvotes: 2

Related Questions