如何为可以覆盖值的不同环境创建多个app.config

问题描述 投票:1回答:1

如何为可以覆盖值的不同环境创建多个app.config

例如,我想要app.Debug.config和app.Release.config,我可以像我在我的网站项目(Web.config Transformation Syntax for Web Application Project Deployment)上那样更改特定值:

<add key="Test" value="Value_For_Test_Environment" xdt:Transform="Replace" xdt:Locator="Match(key)" />
c# console-application app-config config-transformation
1个回答
2
投票

为此,我使用了名为SlowCheetah的扩展。它将转变带到非Web项目。在市场上你有教程使用它。

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

© www.soinside.com 2019 - 2024. All rights reserved.