The last property definition wins (explaining why the BinDirRoot was undefined after the reload).
You need to define all of your preprocessor variables, separated by semi-colons, in the same DefineConstants definition: <PropertyGroup> <DefineConstants>BinDirRoot=$(BranchBinDirRoot);SourceDirRoot=$(BranchSourceDirRoot)</DefineConstants> </PropertyGroup> Edwin G. Castro Software Developer - Staff Electronic Banking Services Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com Please consider the environment before printing this e-mail > -----Original Message----- > From: Elfe Xu [mailto:elf...@microsoft.com] > Sent: Tuesday, June 22, 2010 10:26 AM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Undefined preprocessor variable error > > In MyProj.WIX.Targets, I have > <PropertyGroup> > <DefineConstants>BinDirRoot=$(BranchBinDirRoot)</DefineConstants> > </PropertyGroup> > And in Components.wxs, I have > <File Id="fil1DE3D614CB174A2DA7F5012F10EAC14B" KeyPath="yes" > Source="$(var.BinDirRoot)\abc.dll" /> > So far so good. > > Then I want to add a file from the source, > <File Id="filD8FD88128EAAAC90D4BE23E362C39F64" KeyPath="yes" > Source="$(var.SourceDirRoot)\setup\Relnotes.rtf" /> > Surely I will get error of Undefined preprocessor variable > "$(var.SourceDirRoot) > > Then I modify the MyProj.WIX.Targets, add this line: > <PropertyGroup> > <DefineConstants>BinDirRoot=$(BranchBinDirRoot)</DefineConstants> > > <DefineConstants>SourceDirRoot=$(BranchSourceDirRoot)</DefineConstants> > </PropertyGroup> > Compile again, still has the error Undefined preprocessor variable > "$(var.SourceDirRoot) > > I know that seems the VS has some "cache" and so I close the VS, re- > open it, and complie again. > This time, I got the error of Undefined preprocessor variable > "$(var.BinDirRoot) > > I've no idea what's wrong here. Obviously the BinDirRoot is defined and > should work as before. > Any thoughts? > > Thanks, > -Elfe > ----------------------------------------------------------------------- > ------- > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users