I'm currently working with systems that has quite a lot of configuration settings that are environment specific (Dev, UAT, Production). Does anyone have any suggestions for minimizing the changes needed to the config file when moving between environments as well as minimizing the duplication of data in the config file?
It's mostly Application settings rather than User settings.
The way I'm doing it at the moment is something similar to this:
<DevConnectionString>xyz</DevConnectionString>
<DevInboundPath>xyz</DevInboundPath>
<DevProcessedPath>xyz</DevProcessedPath>
<UatConnectionString>xyz</UatConnectionString>
<UatInboundPath>xyz</UatInboundPath>
<UatProcessedPath>xyz</UatProcessedPath>
...
<Environment>Dev</Environment>
And then I have a class that reads in the Environment setting via the My.Settings
class (it's VB project) and then uses that to decide what other settings to retrieve. This leads to too much duplication though so I'm not sure if it's worth it.