# target::exists

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.92.4543.0)