Any tips on the XmlConfig setting I should use to replace just the address 
attribute value in the following parts of an app.config using a public property 
defined value?

I'm thinking something like the following based on the samples provided for 
using XmlConfig but am concernted that I'm trying to delete and replace a block 
of xml when there may be an option to just replace the "address" attribute 
which is really the only thing I need to change on a per deployment case.

Product.wxs
<File Id="MyTool1.exe.config" Name="MyTool1.exe.config" 
Source="$(var.MyTool1.TargetPath).config" />

<util:XmlConfig Id="Tool1IMyWcfServiceEndpointDelete" 
File="[#MyTool1.exe.config]"
    ElementPath="/configuration/system.serviceModel/client/endpoint"
    VerifyPath="/configuration/system.serviceModel/client/[EMAIL 
PROTECTED]&quot;WSHttpBinding_IMyWcfService&quot;[\]]"
    Name="Child" Action="delete" Node="element" On="install" Sequence="1" />

<util:XmlConfig Id="Tool1IMyWcfServiceEndpointCreate" 
File="[#MyTool1.exe.config]"
    ElementPath="/configuration/system.serviceModel/client/endpoint"
    VerifyPath="/configuration/system.serviceModel/client/[EMAIL 
PROTECTED]&quot;WSHttpBinding_IMyWcfService&quot;[\]]"
    Name="Child" Value="[IMYWCFSERVICEENDPOINT]" Action="create" Node="element" 
On="install" Sequence="1" />

MyTool1.exe.Config
<configuration>
    . .  .
    <system.serviceModel>
<client>
            <endpoint address="https://localhost/MyWcfService/MyWcfService.svc";
                binding="wsHttpBinding" 
bindingConfiguration="WSHttpBinding_IMyWcfService"
                contract="ServiceReference1.IMyWcfService" 
name="WSHttpBinding_IMyWcfService">
            </endpoint>
            <endpoint 
address="https://localhost/MyOtherWcfService/MyOtherWcfService.svc";
                binding="wsHttpBinding" 
bindingConfiguration="WSHttpBinding_IMyOtherWcfService"
                contract="ServiceReference2.IMyOtherWcfService" 
name="WSHttpBinding_IMyOtherWcfService">
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to