-
Notifications
You must be signed in to change notification settings - Fork 95
Addin Discovery Basics
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
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
- Extension Points and Extensions
- Querying Extension Points
- Type Extension Metadata
- Data-only Extension Points
- Data Files and Resources
- About Lazy Loading
- Thread Safety
- The Add-in Registry
- Addin Discovery
- Creating and Managing Add-in Packages
- Advanced Concepts