How to change variables in config files with custom element tags from custom sections?

In my App.config I have custom sections of types System.Configuration.NameValueFileSectionHandler. And in each file, have key value settings.

File App.config

<section name="customElement" type="System.Configuration.NameValueFileSectionHandler, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>


<customElement configSource="CustomElement.config"></customElement>

File CustemElement.config

<?xml version="1.0" encoding="utf-8" ?>
<customElement>
	  <add key="Key1" value="Value1"></add>
	  <add key="Key2" value="Value2"></add>
</customElement>

How can Octopus Deploy update these variables, since “No matching setting or connection string names were found.” in this case?

Hi Achvaicer,

Thanks for getting in touch!

We cover the standard scenarios of AppSettings and Connection Strings, for custom config sections you’re probably best off using either config transform files or a custom powershell script (if your variables are sensitive). We’ve got some doco here http://docs.octopusdeploy.com/display/OD/Configuration+files

Hope that helps!

Damian

Thanks Damian,

For now, I’m using transformation.