Configuration Transforms
App.config xdt transforms
Here is a little hack you can do to enable transformations in app.config
like you can in your web.config
.
A quick intro to transformations, they can make your life a bit easier by storing different configs in different files that, depending on your build configuration, end up in the actual config file. Here is a simple example.
This is the original web.config
file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SomeSetting" value="true" />
<add key="Title" value="Debug" />
</appSettings>
</configuration>
And there is also a web.Release.config
, that looks like this: