I am currently working on a Wix Setup Project for a .Net 8 desktop application.
I am using VS 2022 and running the Heatwave extension and Wix 5.x.
I want to somehow rename the built msi file to include version.
Current name is TankRadar.ServiceTool.Setup.msi and would like the name to be TankRadar.ServiceTool.Setup_[Version].msi eg. TankRadar.ServiceTool.Setup_1.2.0.0.msi
I have tried to do this in the post build event, but as this is a Wix project the version is not accessible the same way as in normal c# projects.
What I have tried so far is this in the post build event:
rename “$(TargetDir)en-US$(TargetFileName)” “$(TargetName)_$(ProductVersion).msi”
But the $(ProductVersion) seems to be empty, I have also tried a whole list of other variable names but none seem to work.