<environment>

A set of environment variables.

Nested Elements:

<option>

Deprecated. Environment variable to pass to a program.

Represents an option.

Parameters

AttributeTypeDescriptionRequired
namestring Name of the option. True
ifbool Indicates if the option should be passed to the task. If true then the option will be passed; otherwise, skipped. The default is true. False
unlessbool Indicates if the option should not be passed to the task. If false then the option will be passed; otherwise, skipped. The default is false. False
valuestring Value of the option. The default is a null reference (Nothing in Visual Basic). False

</option>

<variable>

Environment variable to pass to a program.

Represents an environment variable.

Parameters

AttributeTypeDescriptionRequired
namestring The name of the environment variable. True
dirdirectory The value for a directory-based environment variable. NAnt will convert it to an absolute path. False
filefile The value for a file-based environment variable. NAnt will convert it to an absolute filename. False
ifbool Indicates if the environment variable should be passed to the external program. If true then the environment variable will be passed; otherwise, skipped. The default is true. False
path<path> The value for a PATH like environment variable. You can use : or ; as path separators and NAnt will convert it to the platform's local conventions. False
unlessbool Indicates if the environment variable should not be passed to the external program. If false then the environment variable will be passed; otherwise, skipped. The default is false. False
valuestring The literal value for the environment variable. False

Nested Elements:

<path>

Sets a single environment variable and treats it like a PATH - ensures the right separator for the local platform is used.

</path>

</variable>

Requirements

Assembly: NAnt.Core (0.90.3780.0)