AssemblyAutoLoader class

Registers one or more folders that contain private assemblies and makes sure every DLL in those folders is available to PowerShell / scripts. Call PreloadAll once at startup (or from PowerShell) and forget about “could not load assembly …” errors.

public static class AssemblyAutoLoader

Public Members

name description
static Clear(…) Detaches the AssemblyResolve hook and, optionally, clears the list of search-directories. Call this at the end of a runspace or when the application no longer needs dynamic resolution.
static PreloadAll(…) Scans the supplied directories, loads every DLL that isn’t already loaded, and installs an AssemblyResolve hook so that any later requests are resolved automatically.

See Also