# assembly::load-from-file

Loads an assembly given its file name or path.

### Usage

`Assembly assembly::load-from-file(assemblyFile)`

### Parameters

Name | Type | Description
--- | --- | ---
assemblyFile | string | The name or path of the file that contains the manifest of the assembly.

### Return Value

The loaded assembly.

### Exceptions

The function will fail in any of the following circumstances:

- assemblyFile is an empty String.
- assemblyFile is not found, or the module you are trying to load does not specify a filename extension.
- assemblyFile is not a valid assembly.
- An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters.

### Requirements

Assembly: NAnt.Core (0.92.4543.0)