title: Product Version in WiX 3.5 and Visual Studio WiX Projects
body: <p>In another question about setting the Product Version attribute for a WiX installer (<a href="https://stackoverflow.com/questions/626033/how-can-i-set-the-wix-installer-version-to-the-curent-build-version">How can I set the WiX installer version to the current build version?</a>), the most voted answer (which I've tried and works) recommends:</p>
  
  <p><em>"You could use <code>Product/@Version="!(bind.FileVersion.&lt;FileId&gt;)"</code> and light.exe will populate the value with the version of the file referenced by the FileId."</em></p>
  
  <p>...which is great, but appears slightly brittle in Visual Studio WiX projects when using the harvesting capabilities of the WiX VS project in that the FileId for an executable <strong>might</strong> change.</p>
  
  <p>Is there a safer way of referencing a specific file from the auto-generated .wxs files in Visual Studio other than using the FileVersion Preprocessor Extension (<a href="http://wixfileversionext.codeplex.com/" rel="nofollow noreferrer">http://wixfileversionext.codeplex.com/</a>)?</p>