Walkthrough: Deploying a Custom Data Generator

After you have created a custom generator to work with Data Generator, you must register your generator on your computer. You can either register your generator manually or create a deployment project to register it automatically. In this walkthrough, you create a deployment project for the generator that you created manually in Walkthrough: Creating a Custom Data Generator.

Prerequisites

To complete this walkthrough, you must log on to your computer with administrative credentials, and you must have completed Walkthrough: Creating a Custom Data Generator.

To create a deployment project

  1. Open the project that you completed in Walkthrough: Creating a Custom Data Generator. If you have not yet completed this walkthrough, complete it first before you proceed with this one.

  2. On the File menu, point to Add, and then click New Project.

    The New Project dialog box opens.

  3. Expand the Other Project Types node, point to Setup and Deployment, and click Setup Wizard. Name the project GeneratorSetup, and click OK.

  4. Proceed through the first page of the Setup Wizard. On the second page of the wizard, click Create a setup for a Windows application.

  5. On the third page of the wizard, click the Primary Output from your generator project for inclusion.

  6. On the fourth page of the wizard, click Add. Browse to the .Extensions.xml file that you created to register your custom data generator, and then click Open.

  7. Click Finish.

    Your deployment project is created.

Creating a Custom Folder

You must now create folders in your deployment project that represent the folders where your generator .dll and .Extensions.xml file will be copied.

To create a custom folder

  1. In the deployment project, click the File System tab to specify the file system editor if it is not already specified.

  2. Right-click the white space in the leftmost pane of the file system editor, point to Add Special Folder, and then click Custom Folder.

  3. Type DBPro Folder as the name for the new folder.

  4. In the file system editor, click the custom folder. In the Properties window, set the DefaultLocation property of the folder to [ProgramFilesFolder].

  5. In the Properties window, append the following to [ProgramFilesFolder]:

    \Microsoft Visual Studio 9.0\DBPro
    

    So the resulting property value should be:

    [ProgramFilesFolder]\Microsoft Visual Studio 9.0\DBPro
    
  6. In the left-hand pane of the file system editor, click Application Folder. Right-click the .Extensions.xml file, and click Cut.

  7. In the left-hand pane of the file system editor, click DbPro Folder. Right-click the central pane, and click Paste.

    The .Extensions.xml file is deployed in the directory location that is specified for this custom folder.

  8. Right-click the white space in the leftmost pane of the file system editor, point to Add Special Folder, and then click Custom Folder.

  9. Type Private Assemblies Folder as the name for the new folder.

  10. In the file system editor, click the custom folder. In the Properties window, set the value of the DefaultLocation property to [ProgramFilesFolder].

  11. In the Properties window, append the following to [ProgramFilesFolder]:

    \Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies
    

    The resulting value should be:

    [ProgramFilesFolder]\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies
    
  12. In the left-hand pane of the file system editor, click Application Folder. Right-click the Primary output from TestGenerator file, and click Cut.

  13. In the left-hand pane of the file system editor, click Private Assemblies Folder. Right-click the central pane, and click Paste.

    The primary output from your generator project is deployed in the directory location that is specified for this custom folder.

Building the Deployment Project

You will now build the deployment project, which you can then run to install the custom data generatoon any computer on which you have installed Visual Studio Team System Database Edition.

To build the deployment project

  1. On the Build menu, click Configuration Manager, and ensure that the Build check box is selected for all projects.

  2. On the Build menu, click Build Solution to build the solution.

    Your deployment project is built and ready to install.

Security

For more information, see Security of Data Generators.

See Also

Tasks

Walkthrough: Creating a Custom Data Generator

Walkthrough: Registering a Custom Data Generator

How to: Register Custom Data Generators