2012-01-02 65 views
1

我正在使用Nant構建過程。我需要更改我的web.config文件以設置終點地址。 我的web.config文件中包含5個端點地址,我需要改變它的名字是像「服務1」這些節點的端點地址如何通過xmlpoke更改web.config中的特定值節點?

<endpoint address="" binding="wsHttpContextBinding" 

bindingConfiguration="WSHttpContextBinding_Iservice1" contract="xyz" name="**service1**"> 

回答

1

您需要創建調用xmlpoke

目標示例代碼:

<xmlpoke 
file="Web.config" 
xpath="/configuration/system.ServiceModel/services/service/endpoint[@name = 'service1']/@address" 
value="127.0.0.1:8080" />