BaseDocumenter.SetupAssemblyResolver Method

NDoc Core

NDoc Documentation

BaseDocumenter.SetupAssemblyResolver Method 

Setup AssemblyResolver for case where system doesn't resolve an assembly automatically. This puts in the directories in ReferencesPath, and the directories to each assembly referenced in the project.

protected AssemblyResolver SetupAssemblyResolver(
   Project project
);

Parameters

project

Remarks

The case which forced this to be so thorough is when an assembly references an unmanaged (native) dll. When the assembly is loaded, the system must also find the unmanaged dll. The rules for finding the unmanaged dll are apparently just like any other application: current working directory, the path environment variable, etc.

So in order to handle that case, we have to install an AssemblyResolver that catches the resolution failure, and uses an assembly load function that cd's to the directory which hopefully contains the unmanaged dll (see LoadAssembly()). So in this case I'm assuming that the directory containing the referencing assembly also contains the unmanaged dll.

See Also

BaseDocumenter Class | NDoc.Core Namespace