Summary
Searches the probing paths of the current target framework for the
specified file.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- NAntFunctions
Syntax
[Function("scan-probing-paths")]
[EditorBrowsable(EditorBrowsableState.Never)]
public string ScanProbingPaths(string fileName)
Examples
Compile an assembly referencing the nunit.framework
assembly
for the current target framework that is shipped as part of the
NAnt distribution.
<csc target="library" output="NAnt.Core.Tests.dll">
<sources basedir="NAnt.Core">
<include name="**/*.cs" />
</sources>
<references>
<include name="NAnt.Core.dll" />
<include name="${framework::get-lib-path('nunit.framework.dll')}" />
</references>
</csc>
Remarks
The (relative) probing paths are resolved relative to the base directory of the appdomain in which NAnt is running.
The configured probing paths are scanned recursively in the order in which they are defined in the framework configuration.
The file name to search should include the extension.
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Editor |
Parameters
Name | Type | Description |
---|---|---|
fileName | string | The name of the file to search for. |
Return Value
Type | Description |
---|---|
string | The absolute path to fileName if found in one of the configured probing; otherwise, an error is reported. |