It might be better to just use preprocessor variables in your WiX files and
then pass in those values when you call the MSBuild NAnt task. In your wxs
files use:
$(var.Version) and then when calling MSBuild, set
/property:DefineConstants=Version=1.0.1013.0. Then you don't have to use
NAnt to change your source files, which is usually not a good idea with
Source Code Control systems.

Justin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Paulsen
Sent: Tuesday, April 10, 2007 7:25 AM
To: Scott Sam
Cc: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] getting variables from nant to votive wix project

Scott Sam wrote:
> We have nant create the version number during the build.  I would like
> to use this in various places in the wix projects.  Is there a way to do
> this without setting environment variables?  I'm using votive and just
> using nant's msbuild task to build the solution.  I don't want to use
> environment variables because there could be multiple versions building
> at the same time.

Since you are using nant for the version number, you can use the xmlpoke
task to put the value right into your wxs, like this:

<xmlpoke file="MyInstaller.wxs" xpath="/wix:Wix/wix:Product/@Version"
value="${buildnumber.version}">
<namespaces>
<namespace prefix="wix" uri="http://schemas.microsoft.com/wix/2006/wi"/>
</namespaces>
</xmlpoke>

--
Jeff Paulsen

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to