title: How to Explicitly Remove dll During Majorupgrade Using Wix Toolset
body: <p>We are trying to deploy an update to our product which contains an updated dll. This dll also has a version number so normally the installer should be able to see this and replace the old dll. </p>
  
  <p>Windows installer only cares about the first three numbers when checking version number. However in this case the updated version number looks the same save for the fourth number. So for example if the previous one hade 1.0.0.12 this has 1.0.0.20 hence the installer see them as the same version and does not replace the file. I have no control over the version numbering in this case and since we include a lot of dlls this could happen again in the future.</p>
  
  <p>How would one go about making the installer replace the file no matter if the version number is the same?</p>
  
  <p>After searching for different solutions I have tried to tell the installer to remove the file during the install process. I do not want to remove all files if not necessary. So far I have tried the solution as showed in the included code snippet. The removefile element is new in this version of the installer.</p>
  
  <pre><code>&lt;Component Id="SomeComponent" Win64="yes" Guid="*"&gt;
  &lt;File Id="SomeFile" KeyPath="yes" Source="$(var.app.TargetDir)\some.dll" /&gt;
  &lt;RemoveFile Id="RemoveSomeFile" Name="some.dll" On="install"/&gt;
  &lt;/Component&gt;
  </code></pre>
  
  <p>The result i expect is for the old dll to be replaced by the new dll however after install the old dll is still there and no new one.</p>