title: How to keep a config file when major upgrade in wix v3.8?
body: <p>I want to keep a config file when the msi installer does a major upgrade. For the config file, I make a change when installing. The code is as follows:</p>
  
  <pre><code>&lt;Component Id="MODIFYCONFIG" Guid="6A1D7762-B707-4084-A01F-6F936CC159CE" Win64="yes"&gt;
      &lt;File Id="Application.config" Name="Application.config" Vital="yes" KeyPath="yes" Source="Resource\Application.config"&gt;&lt;/File&gt;
      &lt;util:XmlFile Id="SetValueIP" Action="setValue" Permanent="yes" File="[#Application.config]"
           ElementPath="/configuration/applicationSettings/Application.Properties.Settings/setting[\[]@name='IpAddress'[\]]/value"  Value="[IPADDRESS]" Sequence="1"/&gt;
      &lt;util:XmlFile Id="SetValuePort" Action="setValue" Permanent="yes" File="[#Application.config]"
           ElementPath="/configuration/applicationSettings/Application.Properties.Settings/setting[\[]@name='IpPort'[\]]/value"  Value="[PORT]" Sequence="2"/&gt;
      &lt;Condition&gt;Not Installed&lt;/Condition&gt;
    &lt;/Component&gt;
    &lt;Component Id="KEEPCONFIG" Guid="F7F173AA-C2FD-4017-BFBC-B81852A671E7" Win64="yes"&gt;
      &lt;RemoveFile Id="ApplicationConfig" Name="Application.config" On="uninstall"/&gt;
      &lt;Condition&gt;(REMOVE=ALL) AND (NOT UPGRADINGPRODUCTCODE)&lt;/Condition&gt;
    &lt;/Component&gt;
  </code></pre>
  
  <p>But when a major upgrade occurs the file is not preserved. How can I preserve the modified file?</p>