How to: Distribute Custom Feature Extensions to Team Members
After you have created a custom extension .dll assembly and an .Extensions.xml file, you can distribute them to team members by using a Setup Wizard project. The setup project will put the assembly and the XML file into a user's %Program Files%\Microsoft Visual Studio 10.0\VSTSDB\Extensions\CustomExtensions folder. This will make it easier to install and register the custom extension on a target user's computer. For more information, see How to: Register and Manage Feature Extensions.
To create a deployment project
Open an existing database extensibility project.
On the File menu, point to Add, and then click New Project.
The New Project dialog box opens.
In the list of Installed Templates, expand the Other Project Types node, and click Setup and Deployment. In the details pane, click Setup Wizard. Name the project DataBaseExtensionsSetup, and click OK.
Proceed through the first page of the Setup wizard by clicking Next.
On the second page of the wizard, click Create a setup for a Windows application, and then click Next.
On the third page of the wizard, click Primary Output from <database extensibility project name>, and then click Next.
On the fourth page of the wizard, click Add. Browse to the <database extensibility project name>.Extensions.xml file that you created to register your custom data generator, and then click Open.
Your deployment project has been created.
You must now create folders in your deployment project that represent the folders where your custom extension .dll and .Extensions.xml file will be copied.
To create a custom folder
In the deployment project, click the File System tab to specify the file system editor if it is not already specified.
Right-click in the white space in the leftmost pane of the file system editor, point to Add Special Folder, and then click Custom Folder.
Type Custom Extensions as the name for the new folder.
In the file system editor, click the custom folder. In the Properties window, set the DefaultLocation property of the folder to [ProgramFilesFolder].
In the Properties window, append the following to [ProgramFilesFolder]:
\Microsoft Visual Studio 10.0\VSTSDB\Extensions
So the resulting property value should be:
[ProgramFilesFolder] \Microsoft Visual Studio 10.0\VSTSDB\Extensions
A best practice is to put your extension assemblies in a folder in the <Microsoft Visual Studio 10.0>\VSTSDB\Extensions directory. This will help you identify which extensions were included with the product, and which ones are your custom creations. Folders are also recommended for organizing your extensions into specific categories.
In the leftmost pane of the file system editor, click Application Folder. Right-click the <database extensibility project name>.Extensions.xml file, and then click Cut.
In the leftmost pane of the file system editor, right-click the Custom Extensions folder you created, and then click Paste.
The <database extensibility project name>.Extensions.xml file is deployed in the directory location that is specified for this custom folder.
In the leftmost pane of the file system editor, click Application Folder. Right-click the Primary output from the <database extensibility project name> file, and then click Cut.
In the leftmost pane of the file system editor, right-click the Custom Extensions folder, and then click Paste.
The primary output from your database extensibility project is deployed in the directory location that is specified for this custom folder.
You will now build the deployment project, which you can then run to install the custom database extension on any computer on which you have installed Visual Studio Premium or Visual Studio Ultimate.
To build the deployment project
On the Build menu, click Configuration Manager, and make sure that the Build check box is selected for all projects.
On the Build menu, click Build Solution to build the solution.
Your deployment project is now built and ready to install.