WiX upgrade checking the wrong version of config file -


please note isn't duplicate question: i've tried find on interwebs before asking question (i'll cover tried in detail, of course). also, i'm using wix version 3.10.

i have wix installer has ui allows user change config file values. works, , user-entered values put installed config file.

after initial install , before update, other values may changed in config file.

next, along comes update (major upgrade). want user able change values in config file, , want whatever other changes made (after installation, changes user manually make) in config file kept well.

and, other 40 people posted same exact question, can't work.

my specific error "failed find node", , gives node failed find, node 1 of original values in it, not value user put in.

it gives me system error of -2147020584, isn't windows installer error code, don't know means.

for example, let's original node located @ //configuration/add , value @ node baseaddress="https://10.1.53.164".

during ui, user changes value of node baseaddress="https://hello_world". when run upgrade, error "failed find node://configuration/add@baseaddress="https://10.1.53.164" in xml file:c:\path_to_file\file.exe.config; system error=-2147020584:".

obviously, error message means installer wasn't reading config file on machine, reading original version. that's problem.

the first thing thought of set neveroverwrite of component of config file "yes".

here's code installs config file , components change config file. error refers component id=component_change_ip_address_line_36, may because that's looks @ first.

<fragment>   <componentgroup id="componentgroup_installconfigfile"                   directory="installfolder">        <!-- file we're installing, config file -->       <component id="component_servicehost.exe.config"                  guid="{my-guid}"                   keypath="yes"                   neveroverwrite="yes">           <file id="************.exe.config"                 source="$(var.***.projectdir)bin\release\***.exe.config"/>       </component>        <!--and these changes want make.  first change have user put             target machine's ip address spots ip address needed in file:  line 11             , line 36.-->       <component id="component_change_ip_address_line_11"                  guid="{my-guid}"                  keypath="yes"                  neveroverwrite="yes">           <util:xmlconfig id="changeaddressline11"                           file="[installfolder]***.exe.config"                           action="create"                           on="install"                           node="value"                           name="value"                           value="data source=[service_ip_address];initial catalog=jetlink;integrated security=sspi;connect timeout=120;max pool size=500;application name=***;"                           elementpath="//configuration/appsettings/add[\[]@key='sqlconnectionstring'[\]]"                           sequence="1"/>       </component>       <component id="component_change_ip_address_line_36"                  guid="{my-guid}"                  keypath="yes"                  neveroverwrite="yes">           <util:xmlconfig id="changeaddressline36"                           file="[installfolder]cumminsatmjetlinkservicehost.exe.config"                           action="create"                           on="install"                           node="value"                           name="baseaddress"                           value="https://[service_ip_address]:7276/***"                           elementpath="//configuration/system.servicemodel/services/service/host/baseaddresses/add[\[]@baseaddress='https://10.1.53.164:7276/***'[\]]"                           sequence="1"/>       </component>        <!-- second change allow user enter name of certificate used service -->       <component id="component_change_certificate_line_55"                  guid="{my-guid}"                  keypath="yes">           <util:xmlconfig id="changecertificateline55"                           file="[installfolder]***.exe.config"                           action="create"                           on="install"                           node="value"                           name="findvalue"                           value="[certificate_name]"                           elementpath="//configuration/system.servicemodel/behaviors/servicebehaviors/behavior/servicecredentials/servicecertificate"                           sequence="1"/>        </component>   </componentgroup> 

i wasn't sure component give neveroverwriteattribute, gave them of them.

so didn't work, same error.

next found this conversation, led me this site. says need schedule removeexistingproducts action after installfiles action.

so did. put in installexecutesequence element:

      <installexecutesequence>       <removeexistingproducts before="installfiles"/>       <custom action="customaction_servicekillservice"               after="installinitialize">           (not upgradingproductcode) , (remove="all")       </custom>   </installexecutesequence 

i put above customaction call because that's spot in code have installexecutesequence element, , wix yells @ if put in twice.

so that's i've tried. i'm not sure else try.

to recap: when upgrade installer doesn't read changed config file machine, reads original config file.

anyone have ideas?


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -