nant::scan-probing-paths

Searches the probing paths of the current target framework for the specified file.

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.

string nant::scan-probing-paths(fileName)

Parameters

Name Type Description
fileName string The name of the file to search for.

Return Value

The absolute path to fileName if found in one of the configured probing; otherwise, an error is reported.

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>

Requirements

Assembly
NAnt.Core.dll
Namespace
NAnt.Core.Functions