ComponentUtilitiesCreateComponentContainer Method

This is used to return a composition container filled with the available build components (SHFB plug-ins, presentation styles, BuildAssembler components, and syntax generators).

Definition

Namespace: Sandcastle.Core
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2024.9.12.0
public static CompositionContainer CreateComponentContainer(
	IEnumerable<string> folders,
	ComponentAssemblyResolver resolver,
	CancellationToken cancellationToken
)

Parameters

folders  IEnumerableString
An enumerable list of additional folders to search recursively for components.
resolver  ComponentAssemblyResolver
A component assembly resolver to use or null to use a temporary one
cancellationToken  CancellationToken
An optional cancellation token or null if not supported by the caller.

Return Value

CompositionContainer
The a composition container that contains all of the available components

Remarks

The following folders are searched in the following order. If the given folder has not been specified or does not exist, it is ignored.
  1. The enumerable list of additional folders - This is typically the current project's NuGet packages (package tool paths from the SHFBComponentPath item in their properties file), the project's ComponentPath folder, and the current project's folder. This allows for project-specific build components. Paths are searched in the order given above if specified.
  2. Common application data folder - The help file builder's common application data folder where third-party build components are typically installed.
  3. SHFBROOT core components folder - The core Sandcastle Help File Builder components folder and its subfolders. This allows for XCOPY deployments that keep everything together.
All folders and their subfolders are search recursively for assemblies (*.dll). There may be duplicate component IDs across the assemblies found. Only the first component for a unique ID will be used. As such, assemblies in a folder with a higher search precedence can override copies in folders lower in the search order.

See Also