Udostępnij za pośrednictwem


How to: Upgrade a Project with the Visual Basic Upgrade Wizard

The Visual Basic Upgrade Wizard can be used to upgrade Visual Basic 6.0 projects for further development in Visual Basic 2008. The Upgrade Wizard does not modify your original Visual Basic 6.0 project, but rather creates a new Visual Basic 2008 project based on the original project.

Note

Although the wizard makes the upgrade process easier, you may be required to modify some code in the upgraded application. You should take some time to familiarize yourself with Visual Basic 2008 before attempting this process.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To upgrade a Visual Basic 6.0 project to Visual Basic 2005

  1. Open your project in Visual Basic 6.0. On the File menu, choose Make <projectname>. Run the application and make sure that there are no errors.

  2. Start Visual Studio 2005. On the File menu, point to Open, and then click Project/Solution.

  3. In the Open Project dialog box, browse to the location of the Visual Basic 6.0 project and select the project (.vbp) file.

    This will open the Visual Basic Upgrade Wizard.

  4. On the second page of the wizard, choose from the available upgrade options. The options will vary depending on the type of project being upgraded.

    Tip

    For an explanation of available options, press F1 while in the wizard.

  5. On the third page of the wizard, enter the location where the new project will be created.

    Note

    Each Visual Basic 2008 project must be in its own folder. If you specify a folder that contains files, you will be prompted to choose a different folder.

  6. On the fourth page of the wizard, click Next to begin the upgrade process. When the process is complete, the new project will appear in Solution Explorer.

  7. In Solution Explorer, double-click the _UpgradeReport.htm node to open the upgrade report.

  8. Review the upgrade report. Any errors must be fixed before you can run the application. Any warnings should be examined to make sure that they do not affect application behavior.

    Tip

    For an explanation of any error or warning, click on the description to display a Help topic.

  9. On the Debug menu, choose Start. Run the application and make sure that there are no errors and that the behavior is the same as it was in Visual Basic 6.0.

    Note

    The Upgrade Wizard cannot catch all possible incompatibilities; it is possible that you will encounter additional errors when you run the application. For a list of known issues, see Troubleshooting Applications Upgraded from Visual Basic 6.0.

See Also

Tasks

How to: View the Upgrade Report

Concepts

Preparing a Visual Basic 6.0 Application for Upgrading

WebClasses for Visual Basic 6.0 Users

Other Resources

Upgrading Applications Created in Previous Versions of Visual Basic