<loadfile>

Load a text file into a single property.

Unless an encoding is specified, the encoding associated with the system's current ANSI code page is used.

An UTF-8, little-endian Unicode, and big-endian Unicode encoded text file is automatically recognized, if the file starts with the appropriate byte order marks.

Parameters

Attribute Type Description Required
file file The file to load. True
property string The name of the property to save the content to. True
encoding Encoding The encoding to use when loading the file. The default is the encoding associated with the system's current ANSI code page. False
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

Nested Elements:

<filterchain>

The filterchain definition to use.

</filterchain>

Examples

Requirements

Assembly: NAnt.Core (0.91.4312.0)