如何将 WiX 安装程序版本设置为当前构建版本? [英] How can I set the WiX installer version to the current build version?
问题描述
我编写了一个应用程序及其 WiX 安装程序,并使用 subversion 将其置于版本控制之下.当 WiX 安装程序构建时,我希望它的版本号是应用程序的当前构建版本.我该如何实现?我使用 c# 编写应用程序.
I wrote an application and its WiX installer and put it under version control using subversion. When the WiX installer builds I want its version number to be the current build version of the application. How do I accomplish this? I used c# to code the application.
注意我正在使用 ccnet 来构建这个项目
N.B. I am using ccnet to build this project
推荐答案
You can use Product/@Version="!(bind.FileVersion.FileId)"
(replace FileId
与您要从中获取版本号的文件的 Id
和 light.exe 将使用 FileId引用的文件的版本填充该值代码>.
You could use Product/@Version="!(bind.FileVersion.FileId)"
(replace FileId
with the Id
of the file from which you'd like to get the version number) and light.exe will populate the value with the version of the file referenced by the FileId
.
这篇关于如何将 WiX 安装程序版本设置为当前构建版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!