In addition I think I am correct in saying that
!(bind.assemblyFileVersion.xxx) is not set unless you use the -fv
option.

It is a good idea though, I think I will be changing my installs.

Neil

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rob
Mensching
Sent: 18 July 2008 17:32
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Automatically setting version number

Note, only the "assembly" binder variables require GAC'ing.  If you use
"$(bind.FileVersion.FileId)" then that will always work.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neil Enns
Sent: Friday, July 18, 2008 08:32
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Automatically setting version number

This was my approach for a long time as well, but last week I changed to
using a binder variable. The core application we install is always
stamped with an assemblyversion by the build process. Instead of passing
flags in via the Candle command line, or using a pre-processor variable,
I now grab the assemblyversion directly off the .exe at link time.

Check out the Binder Variables topic in the help file, and
http://blogs.msdn.com/heaths/archive/2008/02/08/get-binder-variables-for
-assemblies-without-installing-into-the-gac.aspx for information on how
to get the binder variable to work without having to install into the
GAC.



Neil

________________________________
From: [EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of Adam Connelly
[EMAIL PROTECTED]
Sent: Friday, July 18, 2008 7:15 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Automatically setting version number

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

------------------------------------------------------------------------
-
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

Reply via email to