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

Addin Discovery Basics

Ali Özgür edited this page Oct 26, 2016 · 4 revisions
Home > Programming Guide > Addin Discovery Basics

Mono.Addins provides a flexible model for specifying where add-ins should be looked up. By default, add-ins are searched in two paths:

  • The application startup path (that is, where the main exe resides)
  • An 'addins' directory, located in the add-in registry path

For example, if an application is located in /usr/lib/MyApplication/start.exe, and the application initializes the add-in engine like this:

AddinManager.Initialize ("[ApplicationData]/MyApplication")

then by default add-ins will be searched in:

  • /usr/lib/MyApplication
  • [ApplicationData]/MyApplication/addins

⚠️ Including Add-in Directories

Additional paths can be included to the default add-in search paths by using a .addins file. A .addins file is an XML file which looks like this:

<Addins>
	<Directory>/some/directory</Directory>
	<Directory include-subdirs="true">/some/other/directory</Directory>
	<Directory>../some/relative/dir</Directory>
	<Exclude>some/directory</Exclude>
</Addins>

When a registry is looking for add-ins in a folder and it finds a .addins file, it will parse it and will start recursively looking for add-ins in the referenced folders (which can also contain other .addins files).

The Directory element can be used to specify new add-in folders. The search is not recursive by default, but it can be made recursive using the include-subdirs attribute.

The Exclude element can be used to exclude a patch from the add-in search. The provided path can be a directory or a specific file.

Next topic: Creating and Managing Add-in Packages

Clone this wiki locally