I figured out after reading the wixv2 source code that 'foreach' is inherently 
disabled. Extending the PreprocessorExtension class is a way to achieve this.
Moreover, I found out that, 'foreach only supports direct nesting of a single 
Fragment element or nested foreach statements.'.
Also, with candle.exe, We are supposed to give the Extension_Type (name of the 
class inheriting PreProcessorExtension) with -ext switch and not the name of 
extension dll(as is the case in v3). I ended up Gacing myExtension.dll and the 
referenced wix.dll into the assembly cache for enabling the preprocessor code 
to load the extension type.

This is something which is really cool in wix v3. No hassle.

Thanks

-----Original Message-----
From: Mukesh Agrawal [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 15, 2008 12:21 AM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Using 'foreach' in wixv2

Hi All,

        <?define LcidList=1033;1041;1055?>
        <?foreach LCID in $(var.LcidList)?>
        <Property Id="Property.$(var.LCID)" Value="0" />
        <?endforeach?>

I was able to use 'foreach' in wix v3.

But, when I tried using it with v2 I got the following error:

The variable named 'LCID' is not allowed in foreach expression.

In the documentation, I read that only LCID is allowed for v2. Even that does 
not seem to work. Any solution for this.

Thanks
Mukesh

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