Understanding the Upgrade Report

Understanding the Upgrade Report

The upgrade report summarizes any problems found during the upgrade. It is added to every project during an upgrade, whether or not there were any problems. Suppose you upgrade a project containing a form with a text box that implements drag and drop, and a module with a type that has a fixed-size array in it. The upgrade report might look something like Figure 8-1.

Figure 8-1

An upgrade report.

Let s look at the different parts of this report:

  • Project name and time of upgrade The first line of the report gives the project name; the second line shows the date and time the project was upgraded.

  • Project items The body of the report contains a table summarizing the project items (forms, classes, modules, and designers) and the issues found for each item during the upgrade. This table has seven columns.

    The first and second columns show the upgraded filename and the original filename, respectively. The third column gives the type of project item form, class, module, and so on. The fourth column summarizes what happened during upgrade: Upgraded (no issues found), Upgraded with Issues, or Not Upgraded. If the project item was not upgraded, the original Visual Basic 6 file will simply be added to the project as a related document. The fifth and sixth columns show the count of errors and warnings for each project item, and the seventh column adds these two numbers to give the total number of issues.

    The table has a row for each project item, plus an extra row at the top of the table labeled (Global Issues) that notifies you of any project-level issues (such as general differences in data binding). Each row has a plus symbol on the left. If you click the plus symbol beside Form1, you ll see the individual issues, as shown in Figure 8-2.

    Figure 8-2

    Expanded view of Form1 issues.

    Form1 has one design error. The OLEDragMode property of TextBox1 was not upgraded. In the report, the description of each error has a second purpose. The description is also a hyperlink that navigates to Help for the EWI, just as the EWI comments in code do.

  • Troubleshooting link This hyperlink navigates to general Help on troubleshooting upgrading. The Help topic also links to pages on the Internet offering the latest troubleshooting information.

  • Upgrade settings The final section of the report shows the Upgrade Wizard settings, locations of the Visual Basic 6 and Visual Basic .NET projects, and any options that were set.

Estimating Fix Time

How long will it take to get your upgraded project working in Visual Basic .NET? Unfortunately, this chapter cannot give you a guaranteed length of time that a given project will take. What we can give you is a mechanism for loading the list of issues into Microsoft Excel and the reassurance that after doing a few upgrades, you ll be faster at solving issues and more accurate at knowing which issues are quick to solve and which take time.

The upgrade report is formatted to be easy to read. For large projects, in which you want to manage the distribution and status of issues within a group of developers, loading the issues into a spreadsheet might make more sense. Doing so allows you to add comments against each issue, such as who the issue is assigned to and its status. Let s look at how to do this.

The upgrade report is actually based on an underlying XML log file. The Upgrade Wizard creates a log file for every upgraded project. The log called <projectname>.log is placed in the same directory as the new Visual Basic .NET project. This log contains all the information in the upgrade report. In fact, the upgrade report is actually generated from the log file. The XML log file is easy for software to read but awkward for humans. Using a simple Excel macro, we can load the list of issues into a spreadsheet. Follow these steps:

  1. Start Excel, and create a new workbook.

  2. Add a new CommandButton to the worksheet. To do this, select View, Toolbars, Control Toolbox. Draw a CommandButton onto the spreadsheet.

  3. Right-click the CommandButton, and choose Properties from the context menu.

  4. In the Properties dialog box, change the name of the CommandButton to LoadUpgradeReport. Change the caption to read Load Upgrade Report.

  5. Double-click the button to open the VBA Macro Editor. Enter the LoadUpgradeReport code.

  6. Choose References from the Tools menu. In the References dialog box, select Microsoft XML, v3.0, and click OK.

  7. Return to the worksheet. Click the Exit Design Mode button, and then click the Load Upgrade Report button. The macro prompts you for the filename of the log file. Enter the path to the log file. The macro populates the worksheet with the contents of the log file, as shown in Figure 8-3.

    Figure 8-3

    Loading the upgrade log into Excel.

Comments in the Excel code also show other columns that you can add to the spreadsheet, such as object type, object name, and the underlying EWI number.



Upgrading Microsoft Visual Basic 6.0to Microsoft Visual Basic  .NET
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET w/accompanying CD-ROM
ISBN: 073561587X
EAN: 2147483647
Year: 2001
Pages: 179

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net