How to create multiple app.config for different environments where values can be overridden

2k views Asked by At

How can I create multiple app.config for different environments where values can be overridden

For example, I want to have app.Debug.config and app.Release.config where I can change specific values in like I do on my web projects (Web.config Transformation Syntax for Web Application Project Deployment):

<add key="Test" value="Value_For_Test_Environment" xdt:Transform="Replace" xdt:Locator="Match(key)" />
1

There are 1 answers

0
Oscar Vicente Perez On BEST ANSWER

For this purpose I used an extension called SlowCheetah. It brings the transformation to non-web projects. In the market you have the tutorial to use it.

https://marketplace.visualstudio.com/items?itemName=vscps.SlowCheetah-XMLTransforms