<available>

(Deprecated)

Checks if a resource is available at runtime.

The specified property is set to true if the requested resource is available at runtime, and false if the resource is not available.

Note: we advise you to use the following functions instead:

Function Description
file::exists() Determines whether the specified file exists.
directory::exists() Determines whether the given path refers to an existing directory on disk.
framework::exists() Checks whether the specified framework exists..
framework::sdk-exists() Checks whether the SDK for the specified framework is installed.

Parameters

Attribute Type Description Required
property string The property that must be set if the resource is available. True
resource string The resource which must be available. True
type ResourceType The type of resource which must be present. True
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Examples

Requirements

Assembly: NAnt.Core (0.91.4312.0)