我目前正在改造项目中的配置文件。
Debug配置如下:
<appSettings file="C:\MyPath\debug.config"></appSettings>
发布看起来像这样:
<appSettings file="C:\MyPath\release.config"></appSettings>
我的目标是根据构建配置文件切换文件位置。
我找不到在发布版本中转换文件值的方法。
参考类似的解决方案或文档将是非常棒的。
我发现它是如何完成的:
我不得不在App.Release.config中使用xdt:Transform="SetAttributes(file)"
像这样:
<appSettings file="C:\MyPath\release.config" xdt:Transform="SetAttributes(file)"></appSettings>
这将仅更改文件值