Identify the most recurrent compilation errors
The key goal with this technique is to identify all the compilation errors of the migrated application. These compilation errors can be categorized by Error Type and sorted by the number of occurrences in the migrated code. The following steps describe this process:
- Generate a Visual Studio solution file (.sln) that includes all the migrated projects. The Visual Basic Upgrade Companion (VBUC) can generate this solution file by using the option Upgrade->Generate Main Sln File.
- Compile the main solution file. The following step is to use the Visual Studio command line build tools* to compile the solution file. It is important to redirect the compiler output to a text file for processing, as in the following example:
msbuild “SolutionFileName” > Results.txt
The Visual Studio IDE limits the amount of compiler errors displayed, while msbuild will output them all.
- Categorize the compile Errors. The text file from the previous step can be processed to categorize all compilation errors by Error Type. Once the errors are categorized, they can be sorted by number of occurrences to determine the most common types.
- Review the migrated source code. The last step is to review the compilation Errors that have the most occurrences and review the source code to determine the way in which the VB6 features related with these compilation errors are used. The objective is to find specific patterns of code that can be manipulated by new migration rules in the VBUC to increase the automatic migration and remove these compilation errors.