diff --git a/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.dll b/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.dll
new file mode 100644
index 00000000..f8b028fa
Binary files /dev/null and b/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.dll differ
diff --git a/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml b/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml
new file mode 100644
index 00000000..15b267e9
--- /dev/null
+++ b/build-support/tools/nant/bin/extensions/common/2.0/NAnt.MSBuild.xml
@@ -0,0 +1,36 @@
+
+
+
+ NAnt
+
+
+ Help
+
+ Element Reference
+ ExpandBaseTask |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Summary description for ExpandTask.
+| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| overwrite | +bool | +Overwrite files, even if they are newer than the corresponding entries in the archive. The default is true. | +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 | +
+
+ NAnt
+
+
+ Help
+
+ Element Reference
+ Pattern |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++
+| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| name | +string | +The name pattern to include/exclude. | +True | +
| if | +bool | +If true then the pattern will be used; otherwise, skipped. The default is true. | +False | +
| unless | +bool | +If false then the pattern will be used; otherwise, skipped. The default is false. | +False | +
+
+ NAnt
+
+
+ Help
+
+ Element Reference
+ Module |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Represents a metadata file without assembly manifest.
+| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| file | +string | +The path of the module. | +True | +
| target | +string | +File name where the module should be copied to before it is compiled into an assembly. | +False | +
+
+ NAnt
+
+
+ Help
+
+ Enum Reference
+ TarCompressionMethod |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Specifies the compression methods supported by <tar> task and <untar> task.
+| Field | +Description | +
|---|---|
| BZip2 | +BZIP2 compression. | +
| GZip | +GZIP compression. | +
| None | +No compression. | +
+
+ NAnt
+
+
+ Help
+
+ Enum Reference
+ FrameworkTypes |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Defines the types of frameworks.
+| Field | +Description | +
|---|---|
| All | +All frameworks supported on the current platform, regarless of their installation state, target device or vendor. | +
| Browser | +Frameworks that run in a browser. | +
| Compact | +Frameworks that target compact devices. | +
| Desktop | +Frameworks that typically target full desktop devices. | +
| Installed | +Frameworks that are installed on the current system. | +
| Mono | +Frameworks released as part of the open-source Mono project. | +
| MS | +Frameworks released by Microsoft. | +
| NotInstalled | +Frameworks that are supported on the current platform, but are not installed. | +
+
+ NAnt
+
+
+ Help
+
+ Enum Reference
+ ManagedExecution |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Specifies the execution mode for managed applications.
+For backward compatibility, the following string values can also be used in build files:
+| Value | +Corresponding field | +
|---|---|
| "true" | +
+ Auto
+ |
+
| "false" | +
+ Default
+ |
+
Even if set to Default, the operating system can still run the program as a managed application.
On Linux this can be done through binfmt_misc, while on Windows installing the .NET Framework redistributable caused managed applications to run on the MS CLR by default.
+| Field | +Description | +
|---|---|
| Auto | +Leave it up to the CLR to determine which specific version of the CLR will be used to run the application. | +
| Default | +Do not threat the program as a managed application. | +
| Strict | +Forces an application to run against the currently targeted version of a given CLR. | +
+
+ NAnt
+
+
+ Help
+
+ Enum Reference
+ DelaySign |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Specifies whether the generated assembly is strongly named and will be signed later.
+For backward compatibility, the following string values can also be used in build files:
+| Value | +Corresponding field | +
|---|---|
| "true" | +
+ Yes
+ |
+
| "false" | +
+ No
+ |
+
| Field | +Description | +
|---|---|
| No | +Fully sign the assembly. | +
| NotSet | +Not specified. | +
| Yes | +Only place the public key in the assembly, allowing the signature to be added later. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assembly::get-full-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the full name of the assembly, also known as the display name.
+string assembly::get-full-name(assembly)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assembly | ++ Assembly + | +The assembly to get the full name for. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assembly::get-location |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the physical location, in codebase format, of the loaded file that contains the manifest.
+string assembly::get-location(assembly)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assembly | ++ Assembly + | +The assembly to get the location for. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assembly::get-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets an AssemblyName for the specified assembly.
+
+ AssemblyName assembly::get-name(assembly)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assembly | ++ Assembly + | +The assembly to get an AssemblyName for. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assembly::load |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Loads an assembly given the long form of its name.
+
+ Assembly assembly::load(assemblyString)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyString | +string | +The long form of the assembly name. | +
Determine the location of the Microsoft Access 11 Primary Interop Assembly by loading it using its fully qualified name, and copy it to the build directory.
+<property name="access.pia.path" value="${assembly::get-location(assembly::load('Microsoft.Office.Interop.Access, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'))}" />
+<copy file="${access.pia.path}" todir="${build.dir}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assembly::load-from-file |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Loads an assembly given its file name or path.
+
+ Assembly assembly::load-from-file(assemblyFile)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyFile | +string | +The name or path of the file that contains the manifest of the assembly. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-assembly-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the AssemblyName for a given file.
+
+ AssemblyName assemblyname::get-assembly-name(assemblyFile)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyFile | +string | +The assembly file for which to get the AssemblyName. | +
Output the full name of the nunit.framework assembly to the build log.
+<echo message="${assemblyname::get-full-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-codebase |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the location of the assembly as a URL.
+string assemblyname::get-codebase(assemblyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyName | ++ AssemblyName + | +The AssemblyName of the assembly. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-escaped-codebase |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the URI, including escape characters, that represents the codebase.
+string assemblyname::get-escaped-codebase(assemblyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyName | ++ AssemblyName + | +The AssemblyName of the assembly. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-full-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the full name of the assembly, also known as the display name.
+string assemblyname::get-full-name(assemblyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyName | ++ AssemblyName + | +The AssemblyName of the assembly. | +
Output the full name of the nunit.framework assembly to the build log.
+<echo message="${assemblyname::get-full-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the simple, unencrypted name of the assembly.
+string assemblyname::get-name(assemblyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyName | ++ AssemblyName + | +The AssemblyName of the assembly. | +
Output the simple name of the nunit.framework assembly to the build log.
+<echo message="${assemblyname::get-name(assemblyname::get-assembly-name('nunit.framework.dll'))}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ assemblyname::get-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the version of the assembly.
+
+ Version assemblyname::get-version(assemblyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyName | ++ AssemblyName + | +The AssemblyName of the assembly. | +
Output the major version of the nunit.framework assembly to the build log.
+<echo message="${version::get-major-version(assemblyname::get-version(assemblyname::get-assembly-name('nunit.framework.dll')))}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ bool::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a logical value to its Boolean equivalent.
+bool bool::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string containing the value to convert. | +
TrueString or FalseString.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ bool::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified Boolean to its equivalent string representation.
+string bool::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +bool | +A Boolean to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ convert::to-boolean |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Converts the argument to a boolean
+bool convert::to-boolean(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +bool | +The string value to be converted to boolean. Must be 'true' or 'false'. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ convert::to-datetime |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Converts the argument to a datetime.
+datetime convert::to-datetime(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +datetime | +value to be converted | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ convert::to-double |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Converts the argument to double
+double convert::to-double(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +The value to be converted. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ convert::to-int |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Converts the argument to an integer.
+int convert::to-int(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +int | +value to be converted | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ convert::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Converts the argument to a string.
+string convert::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +string | +The value to be converted. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ cygpath::get-dos-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the DOS (short) form of the specified path.
+string cygpath::get-dos-path(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to convert. | +
cygpath could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ cygpath::get-unix-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the Unix form of the specified path.
+string cygpath::get-unix-path(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to convert. | +
cygpath could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ cygpath::get-windows-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the Windows form of the specified path.
+string cygpath::get-windows-path(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to convert. | +
cygpath could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-day |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the day of the month represented by the specified date.
+int datetime::get-day(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the day of the month. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-day-of-week |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the day of the week represented by the specified date.
+int datetime::get-day-of-week(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the day of the week. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-day-of-year |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the day of the year represented by the specified date.
+int datetime::get-day-of-year(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the day of the year. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-days-in-month |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of days in the specified month of the specified year.
+int datetime::get-days-in-month(year, month)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| year | +int | +The year. | +
| month | +int | +The month (a number ranging from 1 to 12). | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-hour |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the hour component of the specified date.
+int datetime::get-hour(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the hour component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-millisecond |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the milliseconds component of the specified date.
+int datetime::get-millisecond(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the milliseconds component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-minute |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the minute component of the specified date.
+int datetime::get-minute(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the minute component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-month |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the month component of the specified date.
+int datetime::get-month(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the month component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-second |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the seconds component of the specified date.
+int datetime::get-second(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the seconds component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-ticks |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the number of ticks that represent the specified date.
+long datetime::get-ticks(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the number of ticks. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::get-year |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the year component of the specified date.
+int datetime::get-year(date)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| date | +datetime | +The date of which to get the year component. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::is-leap-year |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns an indication whether the specified year is a leap year.
+bool datetime::is-leap-year(year)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| year | +int | +A 4-digit year. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::now |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a DateTime that is the current local date and time on this computer.
+datetime datetime::now()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a date and time to its DateTime equivalent.
+datetime datetime::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string containing a date and time to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ datetime::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified DateTime to its equivalent string representation.
+string datetime::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +datetime | +A DateTime to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given path refers to an existing directory on disk.
+bool directory::exists(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to test. | +
Remove directory "test", if it exists.
+ <delete dir="test" if="${directory::exists('test')}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-creation-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the creation date and time of the specified directory.
+datetime directory::get-creation-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The directory for which to obtain creation date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-current-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the current working directory.
+string directory::get-current-directory()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-directory-root |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the volume information, root information, or both for the specified path.
+string directory::get-directory-root(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path for which to retrieve the parent directory. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-last-access-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the date and time the specified directory was last accessed.
+datetime directory::get-last-access-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The directory for which to obtain access date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-last-write-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the date and time the specified directory was last written to.
+datetime directory::get-last-write-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The directory for which to obtain write date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ directory::get-parent-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Retrieves the parent directory of the specified path.
+string directory::get-parent-directory(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path for which to retrieve the parent directory. | +
Copy "readme.txt" from the current working directory to its parent directory.
+<property name="current.dir" value="${directory::get-current-directory()}" />
+<property name="current.dir.parent" value="${directory::get-parent-directory(current.dir)}" />
+<copy file="${path::combine(current.dir, 'readme.txt')} todir="${current.dir.parent}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ dns::get-host-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the host name of the local computer.
+string dns::get-host-name()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ double::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a number to its double-precision floating point number equivalent.
+double double::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string containing a number to convert. | +
MinValue or greater than MaxValue.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ double::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified Double to its equivalent string representation.
+string double::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A Double to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-folder-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the path to the system special folder identified by the specified enumeration.
+string environment::get-folder-path(folder)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| folder | ++ SpecialFolder + | +An enumerated constant that identifies a system special folder. | +
Copy "out.log" from the project base directory to the program files directory.
+<copy file="out.log" todir="${environment::get-folder-path('ProgramFiles')}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-machine-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the NetBIOS name of this local computer.
+string environment::get-machine-name()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-operating-system |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets an OperatingSystem object that represents the current operating system.
+
+ OperatingSystem environment::get-operating-system()
+
+
+ Output string representation of the current operating system.
+<echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />
+ If the operating system is Windows 2000, the output is:
Microsoft Windows NT 5.0.2195.0 +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-user-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the user name of the person who started the current thread.
+string environment::get-user-name()
+
+
+ Modify the home directory of the current user on unix-based systems.
+ <exec program="usermod">
+ <arg value="-d" />
+ <arg value="/home/temp" />
+ <arg value="${environment::get-user-name()}" />
+ </exec>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-variable |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the value of the specified environment variable.
+string environment::get-variable(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The environment variable of which the value should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::get-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a Version object that describes the major, minor, build, and revision numbers of the Common Language Runtime.
+
+ Version environment::get-version()
+
+
+ Output the major version of the CLR.
+<echo message="Major version=${version::get-major(environment::get-version())}" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::newline |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the newline string defined for this environment.
+string environment::newline()
+
+
+ Output two lines in a log file.
+ <echo file="build.log" message="First line${environment::newline()}Second line" />
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ environment::variable-exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a value indicating whether the specified environment variable exists.
+bool environment::variable-exists(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The environment variable that should be checked. | +
Execute a set of tasks only if the "BUILD_DEBUG" environment variable is set.
+ <if test="${environment::variable-exists('BUILD_DEBUG')}">
+ ...
+ </if>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the specified file exists.
+bool file::exists(file)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| file | +string | +The file to check. | +
Execute a set of tasks, if file "output.xml" does not exist.
+ <if test="${not file::exists('output.xml')}">
+ ...
+ </if>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::get-creation-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the creation date and time of the specified file.
+datetime file::get-creation-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The file for which to obtain creation date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::get-last-access-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the date and time the specified file was last accessed.
+datetime file::get-last-access-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The file for which to obtain access date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::get-last-write-time |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the date and time the specified file was last written to.
+datetime file::get-last-write-time(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The file for which to obtain write date and time information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::get-length |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the length of the file.
+long file::get-length(file)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| file | +string | +filename | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::is-assembly |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks if a given file is an assembly.
+bool file::is-assembly(assemblyFile)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| assemblyFile | +string | +The name or path of the file to be checked. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ file::up-to-date |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether targetFile is more or equal up-to-date than srcFile.
+bool file::up-to-date(srcFile, targetFile)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| srcFile | +string | +The file to check against the target file. | +
| targetFile | +string | +The file for which we want to determine the status. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ fileversioninfo::get-company-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the company that produced the file.
+string fileversioninfo::get-company-name(fileVersionInfo)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| fileVersionInfo | ++ FileVersionInfo + | +A FileVersionInfo instance containing version information about a file. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ fileversioninfo::get-file-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the file version of a file.
+
+ Version fileversioninfo::get-file-version(fileVersionInfo)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| fileVersionInfo | ++ FileVersionInfo + | +A FileVersionInfo instance containing version information about a file. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ fileversioninfo::get-product-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the product the file is distributed with.
+string fileversioninfo::get-product-name(fileVersionInfo)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| fileVersionInfo | ++ FileVersionInfo + | +A FileVersionInfo instance containing version information about a file. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ fileversioninfo::get-product-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the product version of a file.
+
+ Version fileversioninfo::get-product-version(fileVersionInfo)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| fileVersionInfo | ++ FileVersionInfo + | +A FileVersionInfo instance containing version information about a file. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ fileversioninfo::get-version-info |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a FileVersionInfo representing the version information associated with the specified file.
+
+ FileVersionInfo fileversioninfo::get-version-info(fileName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| fileName | +string | +The file to retrieve the version information for. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified framework exists, and is valid.
+bool framework::exists(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework to test. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-assembly-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the assembly directory of the specified framework.
+string framework::get-assembly-directory(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the assembly directory should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-clr-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the Common Language Runtime version of the current target framework.
+
+ Version framework::get-clr-version()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-clr-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the Common Language Runtime version of the specified framework.
+
+ Version framework::get-clr-version(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the Common Language Runtime version should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-description |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the description of the current target framework.
+string framework::get-description()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-description |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the description of the specified framework.
+string framework::get-description(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the description should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-family |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the family of the specified framework.
+string framework::get-family(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the family should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-framework-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the framework directory of the specified framework.
+string framework::get-framework-directory(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the framework directory should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-frameworks |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a comma-separated list of frameworks filtered by the specified FrameworkTypes.
+string framework::get-frameworks(types)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| types | ++ FrameworkTypes + | +A bitwise combination of FrameworkTypes values that filter the frameworks to retrieve. | +
Define a build-all target that executes the build target once for each installed framework targeting compact devices.
+<target name="build-all">
+ <foreach item="String" in="${framework::get-frameworks('installed compact')}" delim="," property="framework">
+ <property name="nant.settings.currentframework" value="${framework}" />
+ <call target="build" />
+ </foreach>
+</target>
+
+<target name="build">
+ ...
+</target>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-runtime-engine |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the runtime engine of the specified framework.
+string framework::get-runtime-engine(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the runtime engine should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-runtime-framework |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the identifier of the runtime framework.
+string framework::get-runtime-framework()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-sdk-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the SDK directory of the specified framework.
+string framework::get-sdk-directory(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the SDK directory should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-target-framework |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the identifier of the current target framework.
+string framework::get-target-framework()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-tool-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the absolute path of the specified tool for the current target framework.
+string framework::get-tool-path(tool)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| tool | +string | +The file name of the tool to search for. | +
The configured tool paths are scanned in the order in which they are defined in the framework configuration.
The file name of the tool to search should include the extension.
Use gacutil to install an assembly in the GAC.
+<exec program="${framework::get-tool-path('gacutil.exe')}" managed="strict">
+ <arg value="/i" />
+ <arg file="Cegeka.HealthFramework.dll" />
+</exec>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the version of the current target framework.
+
+ Version framework::get-version()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::get-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the version of the specified framework.
+
+ Version framework::get-version(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework of which the version should be returned. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ framework::sdk-exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the SDK for the specified framework is installed.
+bool framework::sdk-exists(framework)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| framework | +string | +The framework to test. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ int::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a number to its 32-bit signed integer equivalent.
+int int::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string containing a number to convert. | +
MinValue or greater than MaxValue.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ int::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified Int32 to its equivalent string representation.
+string int::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +int | +A Int32 to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ long::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a number to its 64-bit signed integer equivalent.
+long long::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string containing a number to convert. | +
MinValue or greater than MaxValue.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ long::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified Int64 to its equivalent string representation.
+string long::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +long | +A Int64 to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ math::abs |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the absolute value of the specified number
+double math::abs(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +value to take the absolute value from | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ math::ceiling |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the smallest whole number greater than or equal to the specified number
+double math::ceiling(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +value | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ math::floor |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the largest whole number less than or equal to the specified number.
+double math::floor(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +value to be , can be anything convertible to a double | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ math::round |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Rounds the value to the nearest whole number
+double math::round(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +Number to be rounded, can be anything convertible to a double. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ nant::get-assembly |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the NAnt assembly.
+
+ Assembly nant::get-assembly()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ nant::get-base-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the base directory of the appdomain in which NAnt is running.
+string nant::get-base-directory()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ operating-system::get-platform |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a PlatformID value that identifies the operating system platform.
+
+ PlatformID operating-system::get-platform(operatingSystem)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| operatingSystem | ++ OperatingSystem + | +The operating system. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ operating-system::get-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets a Version object that identifies this operating system.
+
+ Version operating-system::get-version(operatingSystem)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| operatingSystem | ++ OperatingSystem + | +The operating system. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ operating-system::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the value of the specified operating system to its equivalent String representation.
+string operating-system::to-string(operatingSystem)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| operatingSystem | ++ OperatingSystem + | +The operating system. | +
Output string representation of the current operating system.
+<echo message="OS=${operating-system::to-string(environment::get-operating-system())}" />
+ If the operating system is Windows 2000, the output is:
Microsoft Windows NT 5.0.2195.0 +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::change-extension |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Changes the extension of the path string.
+string path::change-extension(path, extension)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path information to modify. The path cannot contain any of the characters defined in InvalidPathCharsInvalidPathChars. |
+
| extension | +string | +The new extension (with a leading period). Specify a null reference to remove an existing extension from path. | +
A string containing the modified path information.
+On Windows-based desktop platforms, if path is an empty String, the path information is returned unmodified. If path has no extension, the returned path String contains extension appended to the end of path.
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::combine |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Combines two paths.
+string path::combine(path1, path2)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path1 | +string | +first path | +
| path2 | +string | +second path | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-directory-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the directory information for the specified path string.
+string path::get-directory-name(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path of a file or directory. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-extension |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the extension for the specified path string.
+string path::get-extension(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path string from which to get the extension. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-file-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the filename for the specified path string.
+string path::get-file-name(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path string from which to obtain the file name and extension. | +
A String consisting of the characters after the last directory character in path.
+If the last character of path is a directory or volume separator character, an empty String is returned.
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-file-name-without-extension |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the filename without extension for the specified path string.
+string path::get-file-name-without-extension(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path of the file. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-full-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the fully qualified path.
+string path::get-full-path(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The file or directory for which to obtain absolute path information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-path-root |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the root directory of the specified path.
+string path::get-path-root(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path from which to obtain root directory information. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-temp-file-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a uniquely named zero-byte temporary file on disk and returns the full path to that file.
+string path::get-temp-file-name()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::get-temp-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the path to the temporary directory.
+string path::get-temp-path()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::has-extension |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether a path string includes an extension.
+bool path::has-extension(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to search for an extension. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ path::is-path-rooted |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether a path string is absolute.
+bool path::is-path-rooted(path)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| path | +string | +The path to test. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given package exists.
+bool pkg-config::exists(package)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to check. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::get-compile-flags |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the compile flags required to compile the package, including all its dependencies.
+string pkg-config::get-compile-flags(package)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package for which the compile flags should be retrieved. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::get-link-flags |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the link flags required to compile the package, including all its dependencies.
+string pkg-config::get-link-flags(package)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package for which the link flags should be retrieved. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::get-mod-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines the version of the given package.
+string pkg-config::get-mod-version(package)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to get the version of. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::get-variable |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of a variable for the specified package.
+string pkg-config::get-variable(package, name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package for which the variable should be retrieved. | +
| name | +string | +The name of the variable. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::is-atleast-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given package is at least version version.
+bool pkg-config::is-atleast-version(package, version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to check. | +
| version | +string | +The version the package should at least have. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::is-between-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given package is between two versions.
+bool pkg-config::is-between-version(package, minVersion, maxVersion)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to check. | +
| minVersion | +string | +The version the package should at least have. | +
| maxVersion | +string | +The version the package should maximum have. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::is-exact-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given package is exactly version version.
+bool pkg-config::is-exact-version(package, version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to check. | +
| version | +string | +The version the package should have. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ pkg-config::is-max-version |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Determines whether the given package is at no newer than version version.
+bool pkg-config::is-max-version(package, version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| package | +string | +The package to check. | +
| version | +string | +The version the package should maximum have. | +
pkg-config could not be started.
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ platform::get-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the platform on which NAnt is running.
+string platform::get-name()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ platform::is-unix |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether NAnt is running on Unix.
+bool platform::is-unix()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ platform::is-win32 |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++ (Deprecated) +
+Checks whether NAnt is running on Windows (and not just 32-bit Windows as the name may lead you to believe).
+bool platform::is-win32()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ platform::is-windows |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether NAnt is running on Windows.
+bool platform::is-windows()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ project::get-base-directory |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the base directory of the current project.
+string project::get-base-directory()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ project::get-buildfile-path |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the local path to the build file.
+string project::get-buildfile-path()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ project::get-buildfile-uri |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the Uri form of the build file.
+string project::get-buildfile-uri()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ project::get-default-target |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the target that will be executed when no other build targets are specified.
+string project::get-default-target()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ project::get-name |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the current project.
+string project::get-name()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ property::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified property exists.
+bool property::exists(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The property to test. | +
Execute a set of tasks if the "build.debug" property exists.
+ <if test="${property::exists('build.debug')}">
+ <echo message="Starting debug build" />
+ <call target="init-debug" />
+ <call target="build" />
+ </if>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ property::get-value |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of the specified property.
+string property::get-value(propertyName)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| propertyName | +string | +The name of the property to get the value of. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ property::is-dynamic |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified property is a dynamic property.
+bool property::is-dynamic(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The property to test. | +
Check whether the "debug" property is a dynamic property.
property::is-dynamic('debug')
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ property::is-readonly |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified property is read-only.
+bool property::is-readonly(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The property to test. | +
Check whether the "debug" property is read-only.
property::is-readonly('debug')
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::contains |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Tests whether the specified string contains the given search string.
+bool string::contains(source, value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| source | +string | +The string to search. | +
| value | +string | +The string to locate within source. | +
string::contains('testing string', 'test') ==> truestring::contains('testing string', '') ==> truestring::contains('testing string', 'Test') ==> falsestring::contains('testing string', 'foo') ==> false
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::ends-with |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Tests whether the specified string ends with the specified suffix string.
+bool string::ends-with(s1, s2)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s1 | +string | +test string | +
| s2 | +string | +suffix string | +
string::ends-with('testing string', 'string') ==> truestring::ends-with('testing string', '') ==> truestring::ends-with('testing string', 'bring') ==> falsestring::ends-with('string', 'testing string') ==> false
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::get-length |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the length of the specified string.
+int string::get-length(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::get-length('foo') ==> 3string::get-length('') ==> 0
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::index-of |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the position of the first occurrence in the specified string of the given search string.
+int string::index-of(source, value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| source | +string | +The string to search. | +
| value | +string | +The string to locate within source. | +
The lowest-index position of value in source if it is found, or -1 if source does not contain value.
+ If value is an empty string, the return value will always be 0.
string::index-of('testing string', 'test') ==> 0string::index-of('testing string', '') ==> 0string::index-of('testing string', 'Test') ==> -1string::index-of('testing string', 'ing') ==> 4
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::last-index-of |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the position of the last occurrence in the specified string of the given search string.
+int string::last-index-of(source, value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| source | +string | +The string to search. | +
| value | +string | +The string to locate within source. | +
The highest-index position of value in source if it is found, or -1 if source does not contain value.
+If value is an empty string, the return value is the last index position in source.
+string::last-index-of('testing string', 'test') ==> 0string::last-index-of('testing string', '') ==> 13string::last-index-of('testing string', 'Test') ==> -1string::last-index-of('testing string', 'ing') ==> 11
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::pad-left |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the given string left-padded to the given length.
+string string::pad-left(s, totalWidth, paddingChar)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +The String that needs to be left-padded. | +
| totalWidth | +int | +The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. | +
| paddingChar | +string | +A Unicode padding character. | +
string::pad-left('test', 10, ' ') ==> ' test'string::pad-left('test', 10, 'test') ==> 'tttttttest'string::pad-left('test', 3, ' ') ==> 'test'string::pad-left('test', -4, ' ') ==> ERROR
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::pad-right |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the given string right-padded to the given length.
+string string::pad-right(s, totalWidth, paddingChar)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +The String that needs to be right-padded. | +
| totalWidth | +int | +The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. | +
| paddingChar | +string | +A Unicode padding character. | +
string::pad-right('test', 10, ' ') ==> 'test 'string::pad-right('test', 10, 'abcd') ==> 'testaaaaaa'string::pad-right('test', 3, ' ') ==> 'test'string::pad-right('test', -3, ' ') ==> ERROR
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::replace |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a string corresponding to the replacement of a given string with another in the specified string.
+string string::replace(str, oldValue, newValue)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| str | +string | +input string | +
| oldValue | +string | +A String to be replaced. | +
| newValue | +string | +A String to replace all occurrences of oldValue. | +
string::replace('testing string', 'test', 'winn') ==> 'winning string'string::replace('testing string', 'foo', 'winn') ==> 'testing string'string::replace('testing string', 'ing', '') ==> 'test str'string::replace('banana', 'ana', 'ana') ==> 'banana'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::starts-with |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Tests whether the specified string starts with the specified prefix string.
+bool string::starts-with(s1, s2)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s1 | +string | +test string | +
| s2 | +string | +prefix string | +
string::starts-with('testing string', 'test') ==> truestring::starts-with('testing string', 'testing') ==> truestring::starts-with('testing string', 'string') ==> falsestring::starts-with('test', 'testing string') ==> false
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::substring |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a substring of the specified string.
+string string::substring(str, startIndex, length)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| str | +string | +input string | +
| startIndex | +int | +position of the start of the substring | +
| length | +int | +the length of the substring | +
If the length is greater than zero, the function returns a substring starting at character position startIndex with a length of length characters.
+If the length is equal to zero, the function returns an empty string.
+string::substring('testing string', 0, 4) ==> 'test'string::substring('testing string', 8, 3) ==> 'str'string::substring('testing string', 8, 0) ==> ''string::substring('testing string', -1, 5) ==> ERRORstring::substring('testing string', 8, -1) ==> ERRORstring::substring('testing string', 5, 17) ==> ERROR
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::to-lower |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the specified string converted to lowercase.
+string string::to-lower(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::to-lower('testing string') ==> 'testing string'string::to-lower('Testing String') ==> 'testing string'string::to-lower('Test 123') ==> 'test 123'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::to-upper |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the specified string converted to uppercase.
+string string::to-upper(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::to-upper('testing string') ==> 'TESTING STRING'string::to-upper('Testing String') ==> 'TESTING STRING'string::to-upper('Test 123') ==> 'TEST 123'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::trim |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the given string trimmed of whitespace.
+string string::trim(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::trim(' test ') ==> 'test'string::trim('\t\tfoo \r\n') ==> 'foo'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::trim-end |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the given string trimmed of trailing whitespace.
+string string::trim-end(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::trim-end(' test ') ==> ' test'string::trim-end('\t\tfoo \r\n') ==> '\t\tfoo'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ string::trim-start |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the given string trimmed of leading whitespace.
+string string::trim-start(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +input string | +
string::trim-start(' test ') ==> 'test 'string::trim-start('\t\tfoo \r\n') ==> 'foo \r\n'
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ target::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified target exists.
+bool target::exists(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The target to test. | +
Execute target "clean", if it exists.
+ <if test="${target::exists('clean')}">
+ <call target="clean" />
+ </if>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ target::get-current-target |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the name of the target being executed.
+string target::get-current-target()
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ target::has-executed |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified target has already been executed.
+bool target::has-executed(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The target to test. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ task::exists |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Checks whether the specified task exists.
+bool task::exists(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The task to test. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ task::get-assembly |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the Assembly from which the specified task was loaded.
+
+ Assembly task::get-assembly(name)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| name | +string | +The name of the task to get the Assembly of. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-days |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
+timespan timespan::from-days(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A number of days, accurate to the nearest millisecond. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-hours |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
+timespan timespan::from-hours(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A number of hours, accurate to the nearest millisecond. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-milliseconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified number of milliseconds.
+timespan timespan::from-milliseconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A number of milliseconds. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-minutes |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
+timespan timespan::from-minutes(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A number of minutes, accurate to the nearest millisecond. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-seconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
+timespan timespan::from-seconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +double | +A number of seconds, accurate to the nearest millisecond. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::from-ticks |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.
+timespan timespan::from-ticks(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +long | +A number of ticks that represent a time. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-days |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of whole days represented by the specified TimeSpan.
+int timespan::get-days(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
Remove all files that have not been modified in the last 7 days from directory "binaries".
+<foreach item="File" in="binaries" property="filename">
+ <if test="${timespan::get-days(datetime::now() - file::get-last-write-time(filename)) >= 7}">
+ <delete file="${filename}" />
+ </if>
+</foreach>
+
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-hours |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of whole hours represented by the specified TimeSpan.
+int timespan::get-hours(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-milliseconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of whole milliseconds represented by the specified TimeSpan.
+int timespan::get-milliseconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-minutes |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of whole minutes represented by the specified TimeSpan.
+int timespan::get-minutes(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-seconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of whole seconds represented by the specified TimeSpan.
+int timespan::get-seconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-ticks |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the number of ticks contained in the specified TimeSpan.
+long timespan::get-ticks(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-total-days |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the total number of days represented by the specified TimeSpan, expressed in whole and fractional days.
+double timespan::get-total-days(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-total-hours |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the total number of hours represented by the specified TimeSpan, expressed in whole and fractional hours.
+double timespan::get-total-hours(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-total-milliseconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the total number of milliseconds represented by the specified TimeSpan, expressed in whole and fractional milliseconds.
+double timespan::get-total-milliseconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-total-minutes |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the total number of minutes represented by the specified TimeSpan, expressed in whole and fractional minutes.
+double timespan::get-total-minutes(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::get-total-seconds |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Returns the total number of seconds represented by the specified TimeSpan, expressed in whole and fractional seconds.
+double timespan::get-total-seconds(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Constructs a TimeSpan from a time indicated by a specified string.
+timespan timespan::parse(s)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| s | +string | +A string. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ timespan::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified TimeSpan to its equivalent string representation.
+string timespan::to-string(value)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| value | +timespan | +A TimeSpan to convert. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::get-build |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of the build component of a given version.
+int version::get-build(version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| version | ++ Version + | +A version. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::get-major |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of the major component of a given version.
+int version::get-major(version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| version | ++ Version + | +A version. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::get-minor |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of the minor component of a given version.
+int version::get-minor(version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| version | ++ Version + | +A version. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::get-revision |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Gets the value of the revision component of a given version.
+int version::get-revision(version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| version | ++ Version + | +A version. | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::parse |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified string representation of a version to its Version equivalent.
+
+ Version version::parse(version)
+
+
+ | Name | +Type | +Description | +
|---|---|---|
| version | +string | +A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.'). | +
+
+ NAnt
+
+
+ Help
+
+ Function Reference
+ version::to-string |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Converts the specified Version to its equivalent string representation.
+string version::to-string(value)
+
+
+
+
+ NAnt
+
+
+ Help
+
+ Task Reference
+ <untar> |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+Extracts files from a tar archive.
+Uses #ziplib (SharpZipLib), an open source Zip/GZip library written entirely in C#.
+| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| src | +file | +The archive file to expand. | +True | +
| compression | ++ TarCompressionMethod + | + The compression method. The default is None. |
+ False | +
| dest | +directory | +The directory where to store the expanded file(s). The default is the project base directory. | +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 | +
| overwrite | +bool | +Overwrite files, even if they are newer than the corresponding entries in the archive. 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 | +
Extracts all files from a gzipped tar, preserving the directory structure.
++ <untar src="nant-bin.tar.gz" dest="bin" compression="gzip" /> ++
+
+ NAnt
+
+
+ Help
+
+ Type Reference
+ <moduleset> |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
++
One or more modules to compile into an assembly.
+ +| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| dir | +directory | +The base of the directory of this <moduleset>. The default is the project base directory. | +False | +
| id | +string | +The ID used to be referenced later. | +False | +
| refid | +string | +The ID to use as the reference. | +False | +
Represents a metadata file without assembly manifest.
| Attribute | Type | Description | Required |
|---|---|---|---|
| file | string | The path of the module. | True |
| target | string | File name where the module should be copied to before it is compiled into an assembly. | False |
Define a global <moduleset> that can be referenced by other tasks or types.
+ <moduleset id="client-modules" dir="${build}">
+ <module file="Client.netmodule" />
+ <module file="Common.netmodule" />
+ </moduleset>
+
+
+
+ NAnt
+
+
+ Help
+
+ Type Reference
+ <patternset> |
+ + v0.91-alpha2 | +
[This is preliminary documentation and subject to change.]
+A set of patterns, mostly used to include or exclude certain files.
+ The individual patterns support if and unless attributes to specify that the element should only be used if or unless a given condition is met.
The includesfile and excludesfile elements load patterns from a file. When the file is a relative path, it will be resolved relative to the project base directory in which the patternset is defined. Each line of this file is taken to be a pattern.
The number sign (#) as the first non-blank character in a line denotes that all text following it is a comment:
++ EventLog.cs + # requires Mono.Posix + SysLogEventLogImpl.cs + # uses the win32 eventlog API + Win32EventLogImpl.cs ++
Patterns can be grouped to sets, and later be referenced by their id.
When used as a standalone element (global type), any properties that are referenced will be resolved when the definition is processed, not when it actually used. Passing a reference to a nested build file will not cause the properties to be re-evaluated.
+To improve reuse of globally defined patternsets, avoid referencing any properties altogether.
+| Attribute | +Type | +Description | +Required | +
|---|---|---|---|
| id | +string | +The ID used to be referenced later. | +False | +
| refid | +string | +The ID to use as the reference. | +False | +
| Attribute | Type | Description | Required |
|---|---|---|---|
| name | string | The name pattern to include/exclude. | True |
| if | bool | If true then the pattern will be used; otherwise, skipped. The default is true. | False |
| unless | bool | If false then the pattern will be used; otherwise, skipped. The default is false. | False |
name parameter. | Attribute | Type | Description | Required |
|---|---|---|---|
| name | string | The name pattern to include/exclude. | True |
| if | bool | If true then the pattern will be used; otherwise, skipped. The default is true. | False |
| unless | bool | If false then the pattern will be used; otherwise, skipped. The default is false. | False |
| Attribute | Type | Description | Required |
|---|---|---|---|
| name | string | The name pattern to include/exclude. | True |
| if | bool | If true then the pattern will be used; otherwise, skipped. The default is true. | False |
| unless | bool | If false then the pattern will be used; otherwise, skipped. The default is false. | False |
name parameter. | Attribute | Type | Description | Required |
|---|---|---|---|
| name | string | The name pattern to include/exclude. | True |
| if | bool | If true then the pattern will be used; otherwise, skipped. The default is true. | False |
| unless | bool | If false then the pattern will be used; otherwise, skipped. The default is false. | False |
Define a set of patterns that matches all .cs files that do not contain the text Test in their name.
+ <patternset id="non.test.sources"> + <include name="**/*.cs" /> + <exclude name="**/*Test*" /> + </patternset> ++
Define two sets. One holding C# sources, and one holding VB sources. Both sets only include test sources when the test property is set. A third set combines both C# and VB sources.
+ <patternset id="cs.sources">
+ <include name="src/**/*.cs" />
+ <include name="test/**/*.cs" if=${property::exist('test')}" />
+ </patternset>
+
+ <patternset id="vb.sources">
+ <include name="src/**/*.vb" />
+ <include name="test/**/*.vb" if=${property::exist('test')}" />
+ </patternset>
+
+ <patternset id="all.sources">
+ <patternset refid="cs.sources" />
+ <patternset refid="vb.sources" />
+ </patternset>
+
+ Define a set from patterns in a file.
++ <patternset id="sources"> + <includesfile name="test.sources" /> + <includesfile name="non.test.sources" /> + </patternset> ++
Defines a patternset with patterns that are loaded from an external file, and shows the behavior when that patternset is passed as a reference to a nested build script.
+External file "c:\foo\build\service.lst" holding patterns of source files to include for the Foo.Service assembly:
++ AssemblyInfo.cs + *Channel.cs + ServiceFactory.cs+
Main build script located in "c:\foo\default.build":
+
+ <project name="main" default="build">
+ <property name="build.debug" value="true" />
+
+ <patternset id="service.sources">
+ <include name="TraceListener.cs" if="${build.debug}" />
+ <includesfile name="build/service.lst" />
+ </patternset>
+
+ <property name="build.debug" value="false" />
+
+ <target name="build">
+ <nant buildfile="service/default.build" inheritrefs="true" />
+ </target>
+ </project>
+ Nested build script located in "c:\foo\services\default.build" which uses the patternset to feed sources files to the C# compiler:
++ <project name="service" default="build"> + <target name="build"> + <csc output="../bin/Foo.Service.dll" target="library"> + <fileset basedir="src"> + <patternset refid="service.sources" /> + </fileset> + </csc> + </target> + </project>+
At the time when the patternset is used in the "service" build script, the following source files in "c:\foo\services\src" match the defined patterns:
++ AssemblyInfo.cs + MsmqChannel.cs + SmtpChannel.cs + ServiceFactory.cs + TraceListener.cs+
You should have observed that:
+