Skip to main content

The Module Definition File

A module is defined as qualified for loading in Spotfire if it has a valid modules.xml file. It declares the Add-In to the application.

The module.xml file

To define a module available eligible for loading into Spotfire, the extension must be accompanied with a module definition file, module.xml. This module definition file points out the add-in implementation class(es) in the extension assembly, as well as meta-data information regarding the assembly itself. The following section contains the contents of a typical module definition file for an extension:

<?xml version="1.0" encoding="UTF-8"?>
<module>
  <id>38711aa4-5150-4716-9d61-de4e0be86f8a</id>
  <name>MyDxpExtension</name>
  <version>1.0</version>
  <assemblies>
    <assembly>
      <fullname>MyDxpExtension, 
                Version=1.0.0.0, 
                Culture=neutral, 
                PublicKeyToken=4d95002c27fab778</fullname>
      <codebase>MyDxpExtension.dll</codebase>
      <compatibility>
        <min-version>0.0.0.0</min-version>
        <max-version>#.#.*.*</max-version>
      </compatibility>
    </assembly>
  </assemblies>
  <extensions>
    <addIn fullTypeName="MyDxpExtension.CustomAddIn, 
                         MyDxpExtension, 
                         Version=1.0.0.0, 
                         Culture=neutral, 
                         PublicKeyToken=4d95002c27fab778" />
  </extensions>
</module>

Tags

id
Each module has a unique id represented by the guid in this tag.

name
The name of the module. This string should be a user-friendly name as it is displayed to users in various places.

version
The version of the module.

assemblies
Container for defining all assemblies in a module.

assemblies/assembly/fullname
The full name of your assembly.

assemblies/assembly/codebase
The path of the assembly, relative the module definition file.

extensions
Container for defining the add-in implementation classes in your extension.

extensions/addIn
The fullTypeName attribute defines the full name of the add-in class. Again, Reflector can be used to derive this string.

resources
Container for public resources in the package.

resources/publicResource
The name and optionally the culture of a public resource included in the package.