WIX:将安装程序的版本升级到buildversion

WIX:将安装程序的版本升级到buildversion,wix,Wix,我们可以使用在wix中获得产品版本!(bind.fileVersion.Product.exe)。这将返回版本为3.8.2363.0。如何将版本升级到构建版本,即3.8.2363. 我跟随了这个链接,但是使用了 “!(bind.property.ProductVersion.Major)”不能解决我的问题 <?define ProductVersion123="!(bind.fileVersion.mainexe_dll)" ?> <Product Id="{7BDF78BF-

我们可以使用
在wix中获得产品版本!(bind.fileVersion.Product.exe)
。这将返回版本为
3.8.2363.0
。如何将版本升级到构建版本,即
3.8.2363.

我跟随了这个链接,但是使用了 “!(bind.property.ProductVersion.Major)”不能解决我的问题

<?define ProductVersion123="!(bind.fileVersion.mainexe_dll)" ?>
<Product Id="{7BDF78BF-95E8-4ABB-8A0F-4A1483D7FDD1}" Name="SpreadsheetConverter !(bind.property.ProductVersion123.Major)" Language="1033" Version="!(bind.property.ProductVersion123.Major)" Manufacturer="ABC" UpgradeCode="$(var.ProductUpgradeCode)" Codepage="1252">

这会产生以下错误:

未解析的绑定时间变量Mainexe!(bind.property.ProductVersion123.Major)。

请帮忙。 谢谢

你必须意识到什么!(bind.property.X)没有。它从MSI的属性表中检索X属性的值。您尚未在MSI中设置ProductVersion123属性,而是创建了WiX预处理器变量ProductVersion123

因此,您需要做的是将产品的Version属性分配给$(var.ProductVersion123)(它设置MSI的ProductVersion属性)。现在,您可以访问它与!(bind.property.ProductVersion),包括!(bind.property.ProductVersion.X)扩展。

可能重复的