We Are GAP Mobilize
Free Assessment Tool

VBUC

Working with EWIs

The number of generated EWIs depends entirely on your programming style and the size and type of files that make up migrated application. As a rule of thumb, forms usually have more issues than classes and modules. This is caused because forms have a richer object model and significant transformations must be applied when performing the upgrade to Windows Forms.

The best approach to dealing with EWIS is to get the application to compile and run as quickly as possible, leaving the runtime differences, non-critical work, and improvements until later. This requires fixing compilation errors and ToDo EWIs first.

A way to make this work is to use Visual Studio’s Task List. You can filter the Task List to show all the EWIs and compilation errors or to show only the compilation errors. Start by filtering by compilation errors only. Once the project is running, you can start applying fixing runtime errors related to EWIs.

For each EWI, it is better that once a problem is fixed, have the EWI in the code to prevent it for showing up in the Task List. This ensures that the Task List shows an accurate list of remaining issues.

Steps to fix a migration issue

This section shows the recommended steps to fix an error related to both EWIs and other migration errors: 

  1. Locate the source of the problem
  2. Understand the code purpose in the original VB6 application
  3. Identify a solution in .NET
  4. Implement the solution
  5. Mobilize.NET Customization
  6. Document the solution

Locate the source of the problem

To find the source of the problem you can add some breakpoints a few lines before the code where the exception or the different behavior manifests itself, you need to do this in both the original VB6 code and the upgraded code, that way you can compare to know what is causing the problem or why the problem is occurring.

Understand the code purpose in the original VB6 application

The next step is to understand, in the original VB6 application, the actual functionality of the section of the code causing the problem. You can perform the following activities to understand the original behavior:

  • Check the VB6 documentation for the line of code that is failing. For example, if the problem is related to drag and drop, it is important to understand in detail how this feature works.VB Forums is also a good source for additional information.
  • Create small examples of code that use the same features.
  • Execute again step by step (debug mode) the section of the code causing the problem.
  • If possible, ask to the developer who maintains the application.

Identify a solution in .NET

Once the functionality of the original VB6 application is understood, the next step is to replicate the same functionality in the migrated .NET application. Some recommendations for this are

  1. Create small examples in .NET to replicate the VB6 functionality.
  2. Review the related .NET documentation on the web to determine how to achieve the same functionality in .NET.
  3. Ask your peers or a Mobilize.NET migration expert.

Implement the solution

If you already have a solution, you can implement it. Once you have modified the upgraded code and the found solution was implemented, you need to test your code to confirm that the behavior is the same as the original VB6 application. You can, also, review the rest of the upgraded code to determine if the same problem is present in other areas.

Mobilize.NET Customization (optional)

In some cases, you can consider a Mobilize.NET Customization. Several factors must be taken into account at this point:

  1. Timing
    • Will the current timeframe of the project allows the Mobilize Team to implement the required customization? Is the impact of the error large enough to justify it to be reported in order to be included in future releases used in future projects?
  2. Complexity
    • Is there an opportunity to make the replacement in several places using another automated solution such as Regular Expressions?
  3. Rework required
    • Are the manual changes performed at this point in the project so many that executing a code merge will imply too much additional work?

Document the solution

Once the problem is resolved, it is important that the solution is properly documented and stored in a shared knowledge base so other developers that run into this issue are able to access it. This documentation should include the following information:

  • Description of the problem
  • Description of the solution
  • Examples of the problem and the solution in VB6 and .NET respectively.

 

Talk To An Engineer