Upgrading Visual Basic 6.0 Applications with Visual Basic .NET 2003 - Understanding the comments
(Page 3 of 4 )
You should investigate any comments listed by the upgrade wizard inside the project files. The wizard will generally add comments if that part of the application cannot be upgraded. These comments also show up in the Visual Studio .NET TaskList. There are four different kinds of comments which the upgrade wizard can add to your code. They are:
UPGRADE_ISSUE
UPGRADE_TODO
UPGRADE_WARNING
UPGRADE_NOTE
Let us now examine each of these in detail.
UPGRADE_ISSUE
These comments mark any lines of code that will prevent your code from compiling properly. You should correct these errors before compiling the project. For this purpose, you may have to go through all the files and inspect their code.
UPGRADE_TODO
These comments indicate those portions of code that will compile but will cause a runtime error. Runtime errors are called exceptions. You should fix these errors before compiling the project.
UPGRADE_WARNING
These comments also indicate those portions of code that will compile but may cause a runtime error. As explained above, runtime errors are called exceptions. You should go through these warning messages (if any) and rectify them before executing the project.
UPGRADE_NOTE
These comments mark code that will surely compile and run, but indicate any changes between the codes that could have potential effects. I would strongly suggest you go through these notes and make any modifications to prevent any problems in the future.
One of the points to note with regard to comments is that they will include a hyperlink to the relevant help topic that is associated with the issue.
Visual Basic .NET will automatically list all the upgrade comments on its TaskList as shown in the figure given below.

Figure 6
The above figure shows the entries included on a single Windows Form. Double clicking an entry will take you directly to the corresponding code listing. You can then modify the code after going through the comments listed there.
As explained above, you must resolve all issues to ensure that your upgraded application runs correctly. The TaskList includes UPGRADE_ISSUES, UPGRADE_TODO and UPGRADE_WARNING comments. You need to go through each one of the entries and resolve them appropriately.
Before upgrading a Visual Basic 6.0 project to its .NET counterpart, you should first assess the usefulness of the same. It is better not to upgrade complicated projects, as you may be required to do more work to address all the issues. |
Next: Guidelines for Upgrade >>
More Visual Basic.NET Articles
More By Anand Narayanaswamy