Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Optional Modules

Lluis Sanchez edited this page Jan 24, 2014 · 2 revisions

By using optional modules, and add-in can declare extensions which will be registered only if some specified add-in dependencies can be satisfied.

A module is declared using the Module element:

<Addin>
	...
	<Module>
		<Dependencies>
			...
		</Dependencies>
		<Runtime>
			...
		</Runtime>
		<Extension ...>
			...
		</Extension>
		...
	</Module>
</Addin>

Where:

  • /Addin/Module: Is the declaration of a module. An add-in can contain several optional modules.
  • /Addin/Module/Dependencies: Dependencies that must be satisfied in order for the extensions of this module to be loaded.
  • /Addin/Module/Runtime: Allows declaring assemblies and files to be loaded if the module is active.
  • /Addin/Module/Extension: Extensions to be loaded when the module is active.

The rules explained in the previous sections for specifying dependencies, runtime files and extensions can also be applied for modules.

Clone this wiki locally