Summary
Gets the absolute path of the specified tool for the current
target framework.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- FrameworkFunctions
Syntax
[Function("get-tool-path")]
public string GetToolPath(string tool)
Examples
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>
Remarks
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.
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Parameters
Name | Type | Description |
---|---|---|
tool | string | The file name of the tool to search for. |
Return Value
Type | Description |
---|---|
string | The absolute path to tool if found in one of the configured tool paths; otherwise, an error is reported. |