NAnt SDK Documentation - v0.92

FileFunctions.IsAssembly Method 

Checks if a given file is an assembly.

[Visual Basic]
<Function(Name:="is-assembly")>
Public Function IsAssembly( _
   ByVal assemblyFile As String _
) As Boolean
[C#]
[Function(Name="is-assembly")]
public bool IsAssembly(
   string assemblyFile
);

Parameters

assemblyFile
The name or path of the file to be checked.

Return Value

True if the file is a valid assembly, false if it's not or if the assembly seems corrupted (invalid headers or metadata).

Exceptions

Exception Type Condition
ArgumentNullException assemblyFile is a null String.
ArgumentException assemblyFile is an empty String.
FileNotFoundException assemblyFile is not found, or the file you are trying to check does not specify a filename extension.
SecurityException The caller does not have path discovery permission.

See Also

FileFunctions Class | NAnt.Core.Functions Namespace