How to: Import or Install New Custom Prototypes
In Application Designer or Logical Datacenter Designer, you can import or install custom prototypes that other users have previously created and configured by using these designers or the System Definition Model (SDM) Software Development Kit (SDK). You can then reuse these prototypes to define your applications, endpoints, logical servers, or zones. When you import or install these prototypes, Visual Studio adds these prototypes to the Toolbox.
Anteckning
Some prototypes might include an installation package that performs the installation for you. The Toolbox will display custom prototypes that you create directly from the application or logical datacenter diagrams in your solution automatically. For more information, see How to: Create Custom Prototypes from Configured Applications and Endpoints and How to: Create Custom Prototypes from Configured Zones and Logical Servers.
The SDM SDK and Distributed System Designers save custom prototypes as application prototype (.adprototype) or logical datacenter prototype (.lddprototype) files. In addition, application prototypes created from the SDM SDK are accompanied by .sdmdocument files. These .sdmdocument files are compiled versions of SDM definition (.sdm) files.
Before you can use an application prototype created from the SDM SDK, you must first install the .sdmdocument file. You can perform this task by adding a registry key for each .sdmdocument file that you need to install. Adding these keys makes it possible for the Toolbox to display the prototype. To find the registry location where you must add these keys, use the second procedure below.
Anteckning
You must have power user or administrator permissions to change the registry.
Open the application diagram or a logical datacenter diagram.
Right-click anywhere in the Toolbox, and click Import Prototype.
The Import Prototype from File dialog box appears.
Next to the Prototype Filename box, click the ellipsis (…) button.
In the Select Prototype File window, browse to and double-click the prototype file that you want to import.
The path and name of the prototype file appear in the Prototype Filename box.
Under Import for Users, choose one of the following:
To import the prototype for your use only, click Import for my use only and then click OK.
To import the prototype for all users on your computer, click Import for all users of this computer and then click OK.
Anteckning
If you are running Visual Studio on Windows Server 2003 or Windows XP, you must have at least Power User permissions to complete this task. If you are running Visual Studio on Windows Vista, you must have administrator permissions.
The prototype appears in the Toolbox.
Open the Registry Editor and browse to the following location:
HKEY_LOCAL_MACHINE \SOFTWARE\Microsoft\VisualStudio\9.0\EnterpriseTools\Sdm\InitializationFiles
Right-click the InitializationFiles folder, point to New, and choose String Value to create a new registry key.
Type a unique name for the registry key.
Tips
To name the registry key, use the name of the .sdmdocument file and append it with an .sdm extension. Visual Studio loads .sdmdocument files in alphabetical order. Therefore you need to make sure that Visual Studio first loads all .sdmdocument files that are imported by other .sdmdocument files. To make sure that Visual Studio loads these files in the required order, add numerical prefixes to their registry key names.
Right-click the new key and choose Modify.
In the Value data box of the Edit String dialog box, type the full path and file name of the .sdmdocument file.
Restart Visual Studio to load the .sdmdocument files from the specified location.
Troubleshooting Extensibility Issues