다음을 통해 공유


An Example of Creating a New VMM UI Add-in

This page is now retired and kept for archival purposes. This programming guide has been published on MSDN at http://msdn.microsoft.com/library/jj860311.aspx

The information in this topic applies only to System Center 2012 SP1.

This topic provides the steps to create a new Virtual Machine Manager (VMM) for System Center 2012 Service Pack 1 (SP1) add-in. This example will create a new custom action add-in. The first step when you create an add-in is to create the manifest.xml file.

Manifest

As noted in the [[Manifests]] topic, the manifest contains the definition of your add-in for the console to read when the add-in package is installed. While the manifest can contain more than a single add-in definition, but for the purposes of this example, we will only create a single add-in definition.

Create the Manifest

Before you create the manifest, it may be useful to create a temporary folder that you can use to gather all the files that are required to create the add-in package. The instructions from now on will assume that you are using a temporary folder, and for example purposes, the folder C:\temp will be used.

  1. In the temporary directory, create a new manifest.xml file, following the procedure steps in the [[How to Define a Manifest]] topic.

  2. An entry in the manifest file for your add-in must be created. While continuing to modify the manifest.xml file, follow the procedure steps in the [[How to Define a Custom Action Add-in in the Manifest]] topic.

  3. Save the manifest file.

Code a Custom Action Add-in

A custom action add-in can be coded by using Visual Studio. To code your custom action add-in, see [[How to Create an Action Add-in]]. When you compile the add-in code, the .dll file created should be copied to the temporary folder used in packaging the add-in.

Package and Install the Add-in

Gather all required files, the manifest.xml file, the .dll file that contains the add-in code, and any dependent files that are required by the DLL. These files are added to a .zip file which will represent the add-in package installable by the console.

  1. Create the add-in package. Use the files you have previously copied to the c:\temp folder. For instructions on how to create a package, see [[How to Create an Add-in Package]].

  2. Install the add-in package by using the VMM console. For more information, see [[How to Install or Uninstall an Add-in]].

See Also

[[Getting Started with VMM UI Add-ins]]

[[Virtual Machine Manager UI Add-in Example Project]]

[[How to Define a Manifest]]

[[How to Define a Custom Action Add-in in the Manifest]]

[[How to Create an Action Add-in]]

[[How to Create an Add-in Package]]

[[How to Install or Uninstall an Add-in]]