Working with Visual Basic Project Dependencies

When you import a Microsoft® Visual Basic® project into your installer project, Microsoft® Visual Studio® Installer identifies the Visual Basic project output and dependent files and imports them all into the installer project.

Project output files are the files created by the Visual Basic project itself — for example, an .exe or .ocx file. Dependent files are run-time files or components the Visual Basic application requires to run.

Note   Some dependencies imported with a Visual Basic project may be merge modules (.msm files). You may want to specify where Visual Studio Installer should search for merge modules it must import. For more information, see Merge Module Search Path Tab (Project Properties Dialog Box).

This topic explains how to:

  • Find Visual Basic project dependencies that have been imported into your installer project.

  • Delete Visual Basic project dependencies from your installer project.

  • Restore Visual Basic project dependencies you have removed from your installer project.

Before you start

Visual Basic project dependencies are added to your installer project when you import the Visual Basic project. You can import a Visual Basic project when you create the installer project, or you can add one to an existing installer project.

To find Visual Basic project dependencies in your installer project

Visual Basic project dependencies are shown in the ProjectExplorer with the outputs of the Visual Basic project to which they belong.

  1. In the Project Explorer, expand the Files node under your installer project.

  2. Find and expand the Outputs of Visual Basic project node for the Visual Basic project of interest.

  3. Find and expand the Dependencies node.

    The dependencies of this Visual Basic project are listed in the Dependencies node.

To delete Visual Basic project dependencies from your installer project

If you can assume all of your customers already have a particular Visual Basic project dependency (for example, the Visual Basic run-time file, msvmb60.msm), you may want to delete that dependency from your installer project.

Important   Carefully consider deleting Visual Basic project dependencies from your installer project. If you have deleted a Visual Basic project dependency from the installer project and a user's target machine does not have that dependency, your product installation will fail.

  1. In the Project Explorer, expand the Files node under your installer project.

  2. Find and expand the Outputs of Visual Basic project node for the Visual Basic project of interest.

  3. Find and expand the Dependencies node.

    The dependencies of this Visual Basic project are listed in the Dependencies node.

  4. Right-click the dependency you want to delete.

  5. Select Delete from the context menu.

    The selected dependency is removed from the installer project, and its icon is dimmed in the Dependencies display.

To restore Visual Basic project dependencies to your installer project

You can easily restore Visual Basic project dependencies that have been removed from your Installer project.

  1. In the Project Explorer, expand the Files node under your installer project.

  2. Find and expand the Outputs of Visual Basic project node for the Visual Basic project of interest.

  3. Find and expand the Dependencies node.

    The dependencies of this Visual Basic project are listed in this node.

  4. Right-click the dependency you want to restore.

    You can only restore a dependency that has been removed from the installer project. These dependencies appear dimmed in the listing.

  5. Select Restore Dependency from the context menu.

    The selected dependency is restored to the installer project, and its icon is fully displayed.