title: WiX: is it possible to use the variable name as a part of other variable name?
body: <p>I wrote this in my WiX project file (I simplified my examples):</p>
  
  <pre><code>&lt;?define info = R172 ?&gt;
  &lt;?define var1="$(var.info.TargetPath)" ?&gt;
  &lt;?define var2="$(var.info.TargetDir)" ?&gt;
  </code></pre>
  
  <p>I would like the <code>info</code> will be expanded by preprocessor into such variant:</p>
  
  <pre><code>&lt;?define var1="$(var.R172.TargetPath)" ?&gt;
  &lt;?define var2="$(var.R172.TargetDir)" ?&gt;
  </code></pre>
  
  <p>But I get the error:</p>
  
  <blockquote>
    <p>Undefined preprocessor variable <code>$(var.info.TargetPath)</code>.</p>
  </blockquote>
  
  <p>This variant doesn't work too:</p>
  
  <pre><code>&lt;?define var1="$(var.$(var.info).TargetPath)" ?&gt;
  &lt;?define var2="$(var.$(var.info).TargetDir)" ?&gt;
  </code></pre>
  
  <p>Also I have tried <code>foreach</code> using:</p>
  
  <pre><code>&lt;?foreach info in R172?&gt;
  &lt;?define var1="$(var.info.TargetPath)" ?&gt;
  &lt;?define var2="$(var.info.TargetDir)" ?&gt;
  &lt;?endforeach?&gt;
  </code></pre>
  
  <p>But I get the same problem. </p>
  
  <p>Can I do the similar substitution somehow?</p>
  
  <p><strong>UPD</strong></p>
  
  <p>I.e. I want to use it for working with referenced projects through the <code>foreach</code>:</p>
  
  <pre><code>&lt;!-- The list of the names of referensed projects --&gt;
  &lt;?define ACAD_VERSIONS=R172;R182;R190?&gt;
  
  &lt;?foreach ACAD in ACAD_VERSIONS?&gt;
    &lt;Feature Id="Feature.$(var.ACAD)" Title="$(var.ACAD)" Level="1"&gt;
      &lt;Component Id="cmp$(var.ACAD)" Guid="*" Directory="INSTALLFOLDER"&gt;
        &lt;File Id="extension.$(var.ACAD).dll" Source="$(var.$(var.ACAD).TargetPath)"  KeyPath="yes"/&gt;
      &lt;/Component&gt;
    &lt;/Feature&gt;
  &lt;?endforeach?&gt;
  </code></pre>