Thanks for the replies. I ended up using a wix pre-processor directive, like Neil suggested. I had to write a msbuild task to set the environment variable if it's not already set, however, since on a dev machine the variable would not normally be set (i.e. it's the build server that sets it), and this was causing the candle to squeal.
Cheers, Adam -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christopher Karper Sent: 18 July 2008 13:41 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Automatically setting version number I write an msbuild action, but I have lot's of custom activity, so I have a .targets file of my own that I include in my new projects. That makes it easier to remember, and quick to fix once I find it missing. I like your $(var) method though. Chris On Fri, Jul 18, 2008 at 6:48 AM, Neil Sleightholm <[EMAIL PROTECTED]> wrote: > 1. I think it is ok but Windows Installer will ignore the 4th part. > > 2. I pass the version in on the candle command line and use code like this > in the wxs file: > > <!-- This is application version number, update for each release --> > <?ifndef Version?> > <?define Version = "1.23.4" ?> > <?endif ?> > > <Product Id="*" Version="$(var.Version)" etc... > > > Neil > > Neil Sleightholm > X2 Systems Limited > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > > > ________________________________ > > From: [EMAIL PROTECTED] on behalf of Adam Connelly > Sent: Fri 18/07/2008 11:30 > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Automatically setting version number > > > > Hi, > > I've got a CI setup that automatically generates a x.x.x.x style version > number. I've got all my assemblies versioned properly (with a generated > shared SolutionInfo.cs file), and I set the msi output name as > MyMSI-x.x.x.x.msi and now I want to set the Version attribute of the Product > tag. Two questions: > > > 1) Is it ok to put a four digit version number in here? > > 2) How would you recommend I set the version, bearing in mind I get my > version number from a $(build_number) environment variable? > > I was thinking of modifying the project file and shoving a msbuild task > that edits the Product.wxs in, but if possible I'd like to avoid modifying > project files since it would probably be quite easy to forget to do when > setting up new projects. > > Thanks, > Adam > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users