Manifests

 

Applies To: System Center 2012 SP1

The add-in package manifest file is an XML file that describes the add-ins that the package provides for the Virtual Machine Manager (VMM) console. It contains the name of the add-in package author, a simple description of the add-in package, and every individual add-in.

Basic information

The manifest file starts with the root XML node ConsoleAddIn. The root node contains seven possible attributes, some of which are required. The following table describes the possible attributes for the root node:

Attribute name Value type Required Description
Name string Yes Specifies the name of the add-in package.
Version string Yes Specifies the version of the add-in package.

The string that is supplied here is converted into the System.Version equivalent. Therefore, the value here must be compatible with that class.
Author string Yes Specifies the name of the author who created this add-in package.
Description string No Provides a simple description of the add-in package.
FolderName string Yes Identifies the subdirectory that the add-in package will be installed to in the VMM console’s add-in folder. This value is also the unique identifier that differentiates your add-in package from all other add-in packages.

Manifest add-ins

An add-in that is defined by the manifest file is a definition of something that is exposed through the console. One or more add-ins must be defined by the package manifest file. There are two types of add-ins that you can define: an action or a view. An action add-in represents a ribbon button that you can respond to when the user clicks it. A view add-in represents a ribbon button that displays a UI view in the console when the user clicks it. The ribbon entry is defined by the action or view add-in.

Each add-in also defines which VMM console nodes it will display with. For example, if you design a view add-in to target the storage array node, it will cause the button to appear on the ribbon when the storage array node is selected in the console. This represents the targeted context of the add-in.

Actions

To define an action, create an XML node named ActionAddIn and add it as a child of the root XML node. This node describes the action that is to be invoked when the ribbon button is clicked. Optionally, you can configure the action to appear in the shortcut menu of the objects that it targets. The following table describes the attributes that an action XML node defines:

Attribute name Value type Required Description
Name string Yes Specifies the name of the add-in.

If the ActionType attribute is set to Code, this name must match the name of a System.Addin.AddinAttribute attribute that is defined in the assembly referenced by the AssemblyName attribute.
Contexts string Yes Identifies the ribbons that this button will appear on.

You can target multiple ribbons by separating each entry with a space. You can also make the button appear on every home tab by using the value AllHomeTabs.
ShowInContextMenu Boolean No When this attribute is set to True, it displays the ribbon entry in the right-click shortcut menu of the supported object types.
Icon string No Specifies the icon that will display in the ribbon.

The icon can be either a .ICO or .PNG file and should be 32x32 pixels. If using an .ICO file, a small icon can also be supplied at 16x16 pixels.

If this attribute is omitted, a default icon will be provided.
SmallIcon string No Specifies the icon that will display in the context menu. This icon is used when the normal icon defined by the Icon attribute is a .PNG file or an .ICO file that omits the 16x16 size.
ActionType string Yes Specifies the type of action to perform when the ribbon button is clicked. The following list describes the possible values:

URL
Launches a web browser and visits the URL that is provided by the ActionParam attribute.

Application
Launches the application that is identified by the ActionParam attribute.

Code
Executes the add-in code that is identified by the AssemblyName and Name attributes.
ActionParam string See description. Specifies the URL or application path, and the file name.

This attribute is only required when the ActionType attribute is set to URL or Application.
AssemblyName string See description. Specifies the file name of the assembly to load without specifying the extension.

For example: MyCompany.MyAddinFile.dll would be MyCompany.MyAddinFile.

This attribute is only required when the ActionType attribute is set to Code.
AccessKeys string No Specifies the keyboard shortcut keys to click the ribbon button.

If specified, each character in this string represents a single keyboard key the user must press, in sequence, to click the ribbon button.

The string must be two or more characters in length. By default, the ‘Q’ character is prepended to the string.

The ActionAddIn XML node also takes a single child XML node, named ButtonLabel. This node accepts text as its content, which is displayed in the console on the ribbon button or the shortcut menu.

Views

You can define a view by creating an XML node, named ViewAddIn, and then adding it as a child of the root XML node. This node describes the view that is to be displayed when the ribbon button is clicked. The following table describes the attributes that a view XML node defines:

Attribute name Value type Required Description
Name string Yes Specifies the name of the add-in.

This name must match the name of a System.Addin.AddinAttribute attribute that is defined in the assembly that is referenced by the AssemblyName attribute.
AssemblyName string Yes Specifies the file name of the assembly to load, without specifying the extension.

For example: MyCompany.MyAddinFile.dll would be MyCompany.MyAddinFile.
Contexts string Yes Identifies the ribbons that this button will appear on.

You can target multiple ribbons by separating each entry with a space. You can make the button appear on every home tab by using the value AllHomeTabs.
Icon string No Specifies the icon that will display in the ribbon.

If this attribute is omitted, a default icon will be provided.
AccessKeys string No Specifies the keyboard shortcut keys to click the ribbon button.

If specified, each character in this string represents a single keyboard key the user must press, in sequence, to click the ribbon button.

The string must be two or more characters in length. By default, the ‘Q’ character is prepended to the string.

The ViewAddIn XML node also takes a single child XML node, named ButtonLabel. This node accepts text as its content, which is displayed in the console on the ribbon button.

Context values

Each add-in that is defined in a manifest file has a Contexts XML attribute. The context value that is specified will determine which console nodes will include the ribbon button for the add-in. This attribute must contain one or more valid context values. To specify more than one context, separate each context value with a space. The following list groups the contexts based on the types of objects that they work with. Only the values in the bulleted lists can be used:

Managed computer types

  • Host

  • Cluster

Virtualization types

  • HostGroup

  • Cloud

  • VM

  • Service

Storage types

  • StorageArray

  • StoragePool

  • StorageClassification

  • StorageProvider

  • StorageLogicalUnit

Networking types

  • LogicalNetwork

  • LogicalSwitch

  • NetworkGateway

  • MacAddressPool

  • LoadBalancer

  • VipTemplate

  • IpPool

  • VirtualSwitchExtensionManager

All object types
If you specify AllHomeTabs as a context value, the ribbon entry will appear for all object types.

See Also

Architecture Concepts
Context Object Types
Base Classes