I'm using Wix for my application installation and I trying to add to installation the Build Number from TFS as text in on of the dialogs.
All my application dll's and the installer itself has the build number as their file version.
I was able to accomplish this only by getting a file version of an existing EXE(from this post: Getting the file version of a native exe in MSBuild) but not of the running EXE.
<?define Property_ProductVersion = "!(bind.FileVersion.UXIDTEST)" ?>
<Product Id="$(var.ProductId)" Name="$(var.ProductDisplayName)" Language="1033" Version="$(var.Property_ProductVersion)" Manufacturer="$(var.Property_Manufacturer)" UpgradeCode="$(var.ProductUpgradeCode)">
<Package InstallerVersion="300" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='xxx'>
<Component Id='ttt' Guid='{AA2A781C-2324-4F9C-B96C-DCB5BB643409}'>
<File Id="UXIDTEST" Source="OriginalDatabase" ></File>
</Component>
</Directory>
</Directory>
What can I use to get the file version of the running EXE?