How to: Upgrade a Project from the Command Line
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

How to: Upgrade a Project from the Command Line 

In addition to the Visual Basic Upgrade Wizard, Visual Basic 6.0 projects can be upgraded to Visual Basic 2005 using a command-line tool, Vbupgrade.exe.

NoteNote

Vbupgrade.exe is not on the path by default. You will need to either add it to the path or switch to the directory where it is installed before running it from the command line. The default installation location is C:\Program Files\Microsoft Visual Studio 8\Vb\VBUpgrade.

NoteNote

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 project from the command line

  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. At a command prompt, type Vbupgrade <projectname> (where <projectname> is the full path for the Visual Basic 6.0 application) plus any additional command-line arguments.

    NoteNote

    For information on Vbupgrade command-line syntax and options, see Vbupgrade Command-Line Syntax.

  3. Open the resulting project in Visual Basic 2005. Review the code — notes are inserted into the code during upgrade to alert you to any potential problems. 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.

    NoteTip

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

  4. 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.

    NoteNote

    The Vbupgrade tool 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

Show:
© 2016 Microsoft