In the following section, you will find a detailed description of each phase of the VBUC Tool.
After the VBUC tool is installed and activated, you can use it to upgrade VB6 or ASP projects. To do this, it is highly recommended that you follow the next steps to get the maximum benefits from the Visual Basic Upgrade Companion.
To get started, you need to open the icon created by the installation wizard, located on your desktop.
When the VBUC tool is executed, it will ask you for permissions. Once you have accepted the request, it will show a splash window with the general information about the VBUC tool.
VBUC Splash window
Once the VBUC tool is loaded, the first screen you will see is the solution tab.
VBUC Solution Tab
In this first screen, you can see the side panel on the left of the screen. It shows the current upgrade solution step. Also, at the top, you can see the available options to configure the initial steps to upgrade the original project.
Click on the New button, the Upgrade Solution Properties window will be opened.
Upgrade Solution Properties Window
The previous window will show the basic properties of the solution:
- 1.The name of the solution to be created.
- 2.The source path, where the VB6 or ASP code is located.
- 3.The output path, where the upgraded code will be saved.
- 4.Binary references folder, where the binaries needed by the solution are located.
Once you have selected the original project, the source code path will appear in the text area. The output path will be generated based on the source code path, but you can change it to the path of your choice.
Upgrade Solution Properties Window filled after a project was selected
By default, the source code folder will be added to the Binary references folder, but you can add as many as you need.
Once the basic properties are defined, click on the OK button. A window will be shown, indicating the output path does not exist and it will be created. Click on the Yes button to create it and continue with the next steps.
Invalid directory message
Now you can see the name of the solution created at the top of the VBUC tool, the project or projects contained by the original project listed in the working area, and a green checkmark in the Solution step in the side panel.
VBUC Solution Tab
VBUC Solution Tab options
In the image above, you can see the solution options. The purpose of the previous options will be explained below.
- 1.New - Create a new VBUC solution.
- 2.Open - Load a previous VBUC solution stored on your computer.
- 3.Close - Close a solution to load or create a different one.
- 4.Save - Save the current VBUC solution.
- 5.Save As - Save the current VBUC solution with a different name than the one with which it was created.
- 6.Solution Properties - Opens the solution properties of the current VBUC solution.
- 7.Refresh - If you have made a change in the original project, you can refresh the current solution to have the latest changes without creating a new one.
Project Options in the solution tab
In the image above, you can see the selected project options. The purpose of the previous options will be explained below.
- 1.Add Project - With this option, you can add a new VB6 or ASP project to the current solution.
- 2.Remove Project - Once you have selected a project, you can remove it from the current solution.
- 3.Open Container Folder - When you select a project, you can use this option to open the project location folder in the explorer.
If there is a warning in the Resolve References option located in the side panel, you must complete the following steps. Otherwise, you can skip this section.
For the next step, you need to move to the Resolve References tab. In this tab, you can see the Reference List in the center and the available options at the top. References Used By is a panel with the name of projects which are using the selected reference, and is located at the right of the screen. The Type column indicates whether a reference is classified as internal (a project within the migration solution) or external (a third-party library). Make sure that all projects referenced within the migration solution are set as internal because this greatly impacts the output code quality. The VBUC will try to automatically mark as many internal references as possible, but sometimes, because of broken binary compatibility, it is not possible to reliably determine if a given binary is produced by an internal vb6 project. Therefore, some manual interaction might be needed.
At the bottom of the screen, you can see the Binary Folders, which is a list of folders where the references are being searched. Above this, the Unresolved CreateObjects panel will show statements to create an object for which we are unable to determine the type because the reference cannot be found, or it is using a variable or expression to create an object instead of a string.
You can skip this section even if you have a CreateObject error, but it will affect the upgraded code and may cause compilation or runtime errors.
Resolve References Tab
If a reference cannot be determined automatically, then you can use the Analyze References button to try to determine which references are missing. Once you have the missing references on the screen, you need to add it manually. There are two different ways to add a reference:
- 1.Internal, you can set the reference to another project.
- 2.External, you can set the reference to a type library file in your computer (.exe, .tlb, .dll, .ocx).
You just need to resolve a reference once, even if you have multiple projects referencing it, but you need to resolve all the missing references to continue.
To resolve a reference you just need to select it, then click on the option Set Reference Manually at the top of the current tab or right-click on the reference to be resolved and click on the option Set Reference Manually. After you have selected a reference to resolve, a window will be shown.
Locate Component Window
Click on the Browse button and search for the directory where the type library file is located, then select the respective file. If the file is correct, the reference's information will be loaded and shown in the Locate Component window.
Locate component window filled after a reference file was selected
Once you have selected the file to resolve the reference, click on the OK button to close the Locate Component window. Now you can see all the references with a green checkmark.
Resolve References Tab with all references resolved
At the bottom of the "Resolve References" screen, we find the Binary Folders section, which shows the paths where the binary components are located.
Include binary reference folders section
You can optionally add directories where referenced components can be found. The VBUC will try to resolve references automatically to components found in these folders.
By default, the source path is included in this section; it is recommended that you leave this directory in the list.
Include binary reference folders buttons
In the image above, you can see the Binary Reference options. The purpose of the previous options will be explained below:
- 1.Add Binary Folder - This option allows to include a directory to consider more references.
- 2.Remove Binary Folder - This option allows to remove a directory from Binary Folders.
Analyze Option in the Resolve References tab
In the image above, you can see the Analyze option. This option analyzes the references in the project and tries to determine what those references are.
References Options in the Resolve References tab
In the previous one, you can see the references option. This option allows the user to set a reference manually.
Unresolved CreateObjects Options in the Resolve References tab
In the image above, you can see the unresolved create objects options. The purpose of the previous options will be explained below:
- 1.Set Reference Manually - This allows you to set a reference manually for a CreateObject error (same function as the reference).
- 2.Open Code Section - A screen will be shown highlighting the error section. As shown in the image below about the code section.
- 3.Open VB6 Project - The original project will be opened using Visual Basic 6.
Code section window with the create object error
This section could be the most important when you want to upgrade a VB6 or ASP project. Here you can choose the different options to upgrade code, and each option can generate different outputs.
For the next step, you need to move to the Upgrade Options tab. In this tab, you can see, at the center of the screen, the features that you can select. You can change the options list to see the features that you are using or the full list by changing the option at the right of the screen, and the different options associated with this tab at the top of the screen.
Upgrade Options Tab
To upgrade to .NET Framework you just need to select the target language, the Visual Studio version, the .NET platform, and the helpers integration. All of these options are located at the top of the screen. Once you have selected these options, you can confirm the upgrade options selected by default by clicking on the Confirm Options button, or you can change the options according to your needs.
You can click the combo box of any option to see which options it has and select the one you wish to use.
Selecting an option for an upgrade option
Once you have confirmed the upgrade options, you will see a green checkmark on the side panel.
To upgrade to .NET Core or .NET 5 / .NET 6 you need to select that option in the .NET Platform combo box at the top of the screen, as you can see in the next section. If you choose .NET Core you can only upgrade to C# as the target language. If you have selected VB.NET as the target language, the .NET Core option will not be available in the .NET Platform combo box.
Some upgrade options will be disabled due to their incompatibility with .NET Core / .NET 5 / .NET 6 and you will not be able to use them. In those cases, if there is not any other option available, you only can use the option To COM Interop.
Disable options for .NET Core / .NET 5 / .NET 6
The following table shows the different options available between upgrading to .NET Core / .NET 5 vs .NET Framework.
Visual Studio version
2010, 2012, 2013, 2015, 2017, 2019, 2022
Binary, NuGet, Source Code
NuGet, Source Code
NuGet, Source Code
NuGet, Source Code
Upgrade Output options for the Upgrade Options tab
In the image above, you can see the Upgrade Output options. The purpose of the options will be explained below:
- 1.Target Language - With this option you can select which language you want for the output code.
- 2.Visual Studio Version - This option allows you to select a specific Visual Studio version.
- 3..NET Platform - This option allows you to select the platform for which the code will be generated. Depending on the Visual Studio version selected previously, there can be more options available. In the table below we can find the platform versions that can be selected depending on the version of Visual Studio. Important: If VB.NET was chosen as the target language .NET Core 3.1 will not be available as an option.
- 4.Helpers Integration - You can select what kind of integration you want to have with the helpers generated by the VBUC tool.
Important: The NuGet option is only available for using Visual Studio 2019 or Visual Studio 2022.
- Source code - The helpers will be added as code allowing the user to modify them.
- Binary - The helpers will be added as binary files. The user can't modify them.
- NuGet - The helpers will be added as a package, allowing the user to change their version but not the code.
Visual Studio 2010
Visual Studio 2012
Visual Studio 2013
Visual Studio 2015
Visual Studio 2017
Visual Studio 2019
Visual Studio 2022
.NET Framework 4.0
.NET Framework 4.5.2
.NET Framework 4.7
.NET Framework 4.7.2