title: CC.NET configuration preprocessor conditional statements and Windows environment
body: <p>CruiseControl.NET's configuration preprocessor isn't reading my Windows environment like I am expecting it to.  Here's a simple ccnet.config to demonstrate the problem:</p>
  
  <pre><code>    &lt;cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/8"&gt;
          &lt;cb:if expr="'$(PROCESSOR_ARCHITECTURE)' == 'x86'"&gt;
              &lt;cb:define devenvExecutable="C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" /&gt;
          &lt;/cb:if&gt;
          &lt;cb:else&gt;
              &lt;cb:define devenvExecutable="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" /&gt;
          &lt;/cb:else&gt;
  
          &lt;project name="test1" &gt;
              &lt;tasks&gt;
                  &lt;dumpValue&gt;
                      &lt;xmlFileName&gt;somefile.xml&lt;/xmlFileName&gt;
                      &lt;dumpValueItems&gt;
                          &lt;dumpValueItem name="PROCESSOR_ARCHITECTURE" value="$(PROCESSOR_ARCHITECTURE)" /&gt;
                          &lt;dumpValueItem name="devenvExecutable" value="$(devenvExecutable)" /&gt;
                      &lt;/dumpValueItems&gt;
                  &lt;/dumpValue&gt;
              &lt;/tasks&gt;
          &lt;/project&gt;
      &lt;/cruisecontrol&gt;
  </code></pre>
  
  <p>When I open the above file in CCValidator on a machine running Windows 7 64-bit and environment variable PROCESSOR_ARCHITECTURE=AMD64, in the "Processed" output tab of CCValidator it shows:</p>
  
  <pre><code>&lt;tasks&gt;
    &lt;dumpValue&gt;
      &lt;dynamicValues /&gt;
      &lt;environment /&gt;
      &lt;dumpValueItems&gt;
        &lt;dumpValueItem&gt;
          &lt;name&gt;PROCESSOR_ARCHITECTURE&lt;/name&gt;
          &lt;value&gt;x86&lt;/value&gt;
          &lt;valueInCDATA&gt;True&lt;/valueInCDATA&gt;
        &lt;/dumpValueItem&gt;
        &lt;dumpValueItem&gt;
          &lt;name&gt;devenvExecutable&lt;/name&gt;
          &lt;value&gt;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com&lt;/value&gt;
          &lt;valueInCDATA&gt;True&lt;/valueInCDATA&gt;
        &lt;/dumpValueItem&gt;
      &lt;/dumpValueItems&gt;
      &lt;xmlFileName&gt;somefile.xml&lt;/xmlFileName&gt;
    &lt;/dumpValue&gt;
  &lt;/tasks&gt;
  </code></pre>
  
  <p>I'm expecting PROCESSOR_ARCHITECTURE to show as AMD64 and consequently the devenvExecutable to use the (x86) path.  Why isn't it reading my Windows environment properly?  Thank you for any help.</p>