# target::exists

[This is preliminary documentation and subject to change.]

Checks whether the specified target exists.

### Usage

`bool target::exists(name)`

### Parameters

Name | Type | Description
--- | --- | ---
name | string | The target to test.

### Return Value

true if the specified target exists; otherwise, false.

### Examples

- Execute target "clean", if it exists.

                  <if test="${target::exists('clean')}">
                      <call target="clean" />
                  </if>

### Requirements

Assembly: NAnt.Core (0.91.3881.0)