See the last example of "Expanding Preprocessor Constant Values" in
the preprocessor documentation[1].

[1] 
http://ccnetlive.thoughtworks.com/ccnet/doc/CCNET/Configuration%20Preprocessor.html

On Jul 27, 9:30 am, Jeremy Lew <[email protected]> wrote:
> Ruben, I don't think that's correct.
> When evaluating a symbol like $(SystemRoot), the preprocessor first
> looks at any symbols defined in the current scope (i.e. in the config
> file before the evaluation occurred).  If no definition exists, it
> will look for an environment variable with the same name and use its
> value.  If neither exist, an error is thrown.
>
> So, Ido's example should work just fin, except he doesn't need to
> define WindowsDir.  Just use $(SystemRoot) (or whatever environment
> variable name) as if it had been declared.
>
> -Jeremy
>
> On Jul 26, 2:09 am, Ruben Willems <[email protected]> wrote:
>
> > Hi
>
> > if you want the value to be something like c:\windows\system32, this is not
> > going to work
> > the pre-processor does not look at environment variables.
>
> > with kind regards
> > Ruben Willems
>
> > On Sun, Jul 25, 2010 at 12:20 PM, idoy <[email protected]> wrote:
> > > Hi,
>
> > > I have a question about defining a constant in my ccnet.config.
>
> > > I defined an environment variable constant:<env WindwosDir="$
> > > (SystemRoot)"/>
> > > How can I define a constant using that WindwosDir ?
> > > I tried:
> > > <env WindowsDir="$(SystemRoot)"/>
> > > <cb:define SourceDir="$(WindowsDir)\System32"/>
>
> > > but it throws an error.
> > > thanks, Ido

Reply via email to