Upgrading 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 .NET using a command-line tool, Vbupgrade.exe.
Note 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 .NET 2003\Vb7\VBUpgrade.
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.
Note For information on Vbupgrade command-line syntax and options, see Vbupgrade Command-Line Syntax.
- Open the resulting project in Visual Studio .NET. 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.
Tip For an explanation of any error or warning, click on the description to display a Help topic.
- 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 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.