Ok, I've tried this but I can't determine where this is supposed to go. I can't find any complete examples that actually use this.
Here's what I tried, which doesn't work: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> <Product Id="11732b0c-41a8-483b-8a99-a2a1afece53c" Name="My Deluxe Program" Language="1033" Version="!(bind.assemblyFileVersion.myProgramEXE)" Manufacturer="My Software Corp" UpgradeCode="ba6c6a55-3a6c-4080-b77a-92aa0efbc67d"> <Package InstallerVersion="200" Compressed="yes" /> This is in my product.wxs file. When I try to build the solution, I get "Unresolved bind-time variable". If this isn't where the bind.assemblyFileVersion is supposed to go, where is it? Thanks, Colin ps. I also tried using a $(var.ProductVersion) here and in the .wixproj saying ProductVersion=!(bind.assemblyFileVersion...) and it didn't work either. also - what does the ! character represent? Doesn't that usually mean "not"? On Thu, Jan 15, 2009 at 8:02 AM, Rob Mensching <rob.mensch...@microsoft.com>wrote: > Another option, if you are using WiX v3 is to use a binder variable to grab > the file version directly. Something like "!(bind.FileVersion.FileId)". > > -----Original Message----- > From: Reggie Burnett [mailto:r...@comcast.net] > Sent: Thursday, January 15, 2009 04:50 > To: General discussion for Windows Installer XML toolset. > Subject: Re: [WiX-users] Getting the version from the Assembly file > > I ship 4 binary components that all have the same version so I use a > small snippet in my msbuild script that reads the version # from one > of the components and then passes that into to wix through a > preprocessor var. > > On Tue, Jan 13, 2009 at 6:44 PM, Michael Osmond <mosm...@baytech.com.au> > wrote: > > Colin, > > > > You can set an environment variable in the build process and then access > > that inside wix as $(env.projectVersion) > > > > Or you can set an Wix variable in the candle command line > > "candle -dMyProject.Version=<value>" > > > > Michael > > > > -----Original Message----- > > From: Colin Fox [mailto:greenene...@gmail.com] > > Sent: Wednesday, 14 January 2009 10:11 AM > > To: General discussion for Windows Installer XML toolset. > > Subject: Re: [WiX-users] Getting the version from the Assembly file > > > > Yes - our current release strategy is to always release major upgrades. > > The entire MSI is under 10 megs so it's not a huge deal. > > > > I'm relatively new to the company, and this process has been in place > > since long before I got here, but part of the build process is to use a > > build tool to set the version number, and it goes and modifies some > > files. I was hoping to streamline things a bit and just modify one file > > and have the version be deduced by the rest of the system. > > > > If it can't be done through a wix variable, then I can probably modify > > the build tool to change the wix file, but that just feels wrong (not to > > mention will cause unnecessary changes for our revision control system). > > > > On Tue, Jan 13, 2009 at 3:14 PM, Rob Mensching > > <rob.mensch...@microsoft.com>wrote: > > > >> Are you always going to release using Major Upgrades? If not, then > >> you need to keep the name constant. That fact is why you don't see > >> many people putting the version number in the MSI name. Not a common > >> request thus not necessarily simple to implement. > >> > >> -----Original Message----- > >> From: Colin Fox [mailto:greenene...@gmail.com] > >> Sent: Tuesday, January 13, 2009 14:36 > >> To: wix-users > >> Subject: [WiX-users] Getting the version from the Assembly file > >> > >> Hi everyone. > >> > >> I'd like go be able to set the version of my application in the > >> assembly.cs file, and have it used in both the wix file and also in > > the wix file name. > >> > >> So if my app is version 1.2.3, I'd like the .msi file to be called > >> "MyAmazingApp_1_2_3.msi" or something equivalent. > >> > >> I've seen some articles on the net about pulling an assembly version > >> and putting it into the wix file but they all seem like giant hacks. > >> > >> It seems to me that since versions seem to feature so prominently, it > >> makes sense to integrate them more smoothly into the build system. And > > > >> you shouldn't have to set it in more than one place. > >> > >> How difficult would it be to create another candle varable, such as > >> $(var.MyProject.Version) ? > >> > >> Is this something I can add myself, or do I have to jump through those > > > >> ugly hoops? > >> > >> -- > >> Regards, > >> cf > >> > >> ---------------------------------------------------------------------- > >> -------- > >> This SF.net email is sponsored by: > >> SourcForge Community > >> SourceForge wants to tell your story. > >> http://p.sf.net/sfu/sf-spreadtheword > >> _______________________________________________ > >> WiX-users mailing list > >> WiX-users@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wix-users > >> > >> > >> > >> ---------------------------------------------------------------------- > >> -------- > >> This SF.net email is sponsored by: > >> SourcForge Community > >> SourceForge wants to tell your story. > >> http://p.sf.net/sfu/sf-spreadtheword > >> _______________________________________________ > >> WiX-users mailing list > >> WiX-users@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wix-users > >> > > > > > > > > -- > > Regards, > > cf > > ------------------------------------------------------------------------ > > ------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > -- Regards, cf ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users