I need to have the MSI output file name include the full version of the output EXE in the \bin folder. Something like MyFile_x.x.x.x.msi
This works great inside the .WXS file for the installer to get the full version and display it in the installer. But the problem is you can't use bind.FileVersion. within the project file
<?define ProductVersion=!(bind.FileVersion.$(var.Zygo.MetroProXP.UI.TargetFileName)) ?>
The recommended solution is to use the GetAssemblyIdentiy method to redefine the output file name like this.
<GetAssemblyIdentity AssemblyFiles="$(OutDir)MyFile.exe">
<Output TaskParameter="Assemblies" ItemName="ProductAssembly" />
</GetAssemblyIdentity>
<CreateProperty Value="$(OutputName)%(ProductAssembly.Version)">
<Output TaskParameter="Value" PropertyName="TargetName" />
</CreateProperty>
The issue for me is that the version returned is only Major.Minor.Build and I need the full version Major.Minor.Build.Release. That is because the GetAssemblyIdentity returns the AssemblyVersion NOT the AssemblyFileVersion. which does have the 4th portion of the version number define. Does anyone know how I can get the full version for renaming the MSI file?