抱歉这样的问题,但我花了太多时间在上面。我有一个 app.config 文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<userSettings>
<tbp.qa.Properties.Settings>
<setting name="ServiceUri" serializeAs="String">
<value>localhost</value>
</setting>
</tbp.qa.Properties.Settings>
</userSettings>
</configuration>
如何通过配置转换更改“值”,我尝试了以下方法,但没有任何改变:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<userSettings>
<tbp.qa.Properties.Settings>
<add name="ServiceUri" xdt:Transform="Replace" xdt:Locator="Match(name)">
<value>localhost1</value>
</add>
</tbp.qa.Properties.Settings>
</userSettings>
</configuration>
我究竟做错了什么?