Share via


Deploying New Versions of an Add-in Tool

You can easily replace the runtime .dll of an existing add-in tool, however, if you need to change the schema of the add-in tool, you must create a new major version of the add-in tool. After a user installs a major version upgrade, the user can continue to use existing instances of the previous version but can only add the latest version to a workspace.

An add-in tool can be updated in two ways:

  1. In-place dll replacement: you can update the add-in logic including the user interface but cannot update the manifest.

  2. Major version upgrade: you can update both the add-in logic and the manifest. The new updated add-in and the previous versions co-exist. Existing instances use the previous version, but when the workspace member creates a new workspace with the add-in or adds it to an existing workspace, the new version is used.

The version number of an add-in tool is defined in the registry entries for the add-in. The registry defines the version number by the numbered subkey under the add-in GUID. For example, the QuerySample sample provided with in the SDK defines the following registry keys:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Groove\AddIns]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Groove\AddIns\{33e4e8a4-ced7-4255-90f2-0000000092fc}]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Groove\AddIns\{33e4e8a4-ced7-4255-90f2-0000000092fc}\1]
"Label"="QuerySample"
"ManifestPath"="C:\\SPWAddins\\QuerySample"
"ManifestName"="spwaddin.xml"

The QuerySample GUID is {33e4e8a4-ced7-4255-90f2-0000000092fc} and the version number is 1. To update this sample to version 2, edit RegisterAddIn.reg in Visual Studio and replace the subkey with a 2 as follows:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Groove\AddIns\{33e4e8a4-ced7-4255-90f2-0000000092fc}\2]

Note

SharePoint Workspace ignores the version number element in the manifest. If the user right-clicks an add-in tool and selects Properties, SharePoint Workspace does not display the add-in version number defined by the registry or the version defined in the manifest. Instead, it displays a version number of the tool container, which is the same for all add-in tools.

Note

You should not update any fields of the manifest without updating the tool version number in the registry keys. The tool properties are fixed when a tool is added to the workspace. Therefore, if a user adds a tool to a workspace and then later installs an update that does not follow this rule and changes the manifest but not the registry version number, adding a new add-in tool causes inconsistencies. The two add-ins will have different properties, but will both use the same updated .dll. At a minimum, this condition can cause confusion to users, and, if the data schema is changed, can cause run-time errors.