|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.
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.
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.
To upgrade a project from the command line
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.
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.
For information on Vbupgrade command-line syntax and options, see.
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.
For an explanation of any error or warning, click on the description to display Help.
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.
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.