セットアップに Wix を使用する Wcfservice があります。
インストール中に、さまざまな設定を収集し、Product.wxs でこれらの設定を変更する GUI があります。しかし、変更したい baseAddress 設定を見つけるのに苦労しています。
私の設定ファイルには次のセクションがあります:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="Default">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="Default" name="OurServiceLibrary.OurService">
<clear/>
<endpoint name="OurBasicHttpBinding" address="basic" binding="basicHttpBinding" contract="OurServiceLibrary.IOurService" listenUriMode="Explicit"/>
<host>
<baseAddresses>
<!-- The base-address must be updated with the correct url for the hosting machine. -->
<add baseAddress="http://localhost:8081/ourservice"/>
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
そして、設定を変更しようとするときに使用しているコードは次のとおりです。
<!--Put path to settings in local variable-->
<?define ServiceModelSettingsPath="//configuration/system.ServiceModel/services/service/host/baseAddresses/" ?>
<!--Modify settings with values entered in the installation UI-->
<util:XmlFile Id="ModifyServiceBaseAdress"
Action="setValue"
Permanent="yes"
ElementPath="$(var.ServiceModelSettingsPath)/add"
Name ="baseAddress"
File="[#OurServiceSettingsFile]"
Value="connectionString=[SERVICEBASEADRESS_VALUE]"
SelectionLanguage="XPath"
Sequence="1" />
セットアップを実行しようとすると、「ノードが見つかりませんでした: //configuration/system.ServiceModel/services/service/host/baseAddresses//add in XML file」というエラーが表示されます。
明らかにノードへのパスが間違っていますが、方法がわかりません。誰か助けてもらえますか?