File/@Id and @Name are generated during compile. !(wix.) variables are resolved during bind. However, you could use a preprocessor variable $(var.) becaue the order looks like this:
preprocess - candle.exe compile - candle.exe link - light.exe bind - light.exe Kamil Mierzejewski wrote: > Hi, > > I've just noticed an unexpected behaviour while using a WixVariable in > f...@source attribute. For example: > > <WixVariable Id="AppName" Value="TestApp"/> > [...] > <File Source="SourceDir\!(wix.AppName).exe"/> > [...] > > The doc states, that if I don't specify Name or Id, WiX will generate > them for me. When I looked into the generated MSI with Orca it appeared > that the generated Id for the file is "__wix_AppName__exe". It looks > like the variable didn't get resolved while generating f...@id and then > it was "canonicalized" or it was "canonicalized" while generating Id and > therefore it couldn't be resolved. > > Another thing that striked me is that the ShortName part of FileName > column is different when I use WixVariable. The LongName part looks ok. > > When I tried to do something like this: > > <File Source="SourceDir\!(wix.AppName).exe" Id="!(wix.AppName).exe" /> > > I got this error: > > error CNDL0014 : The File/@Id attribute's value, '!(wix.AppName).exe', > is not a legal identifier. Identifiers may contain ASCII characters > A-Z, a-z, digits, underscores (_), or periods (.). Every identifier > must begin with either a letter or an underscore. > > Is it a bug in WiX or maybe I just want the moon on a stick. > > Kamil > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users