Webcast: Visual Studio 2010 Ecosystem Series: Upgrading Applications from Visual Basic 6 to Visual Studio 2010

5. July 2010 05:26 by Jaguilar in General  //  Tags: , ,   //   Comments (0)

A quick post to let you all know that Paul Yuknewicz, Senior Program Manager on the VB Team, and myself will be presenting a webcast on upgrading VB6.0 applications to Visual Studio 2010, this Thursday at 9am PST. Here are some details on the event:


Title: MSDN Webcast: Visual Studio 2010 Ecosystem Series: Upgrading Applications from Visual Basic 6 to Visual Studio 2010 (Level 200)


Summary: Attend this webcast to discover how to use the latest version of ArtinSoft's Visual Basic Upgrade Companion (VBUC) to easily migrate applications developed in Microsoft Visual Basic 6 to both Microsoft Visual Basic .NET and C# using the Microsoft Visual Studio 2010 development system. Now that the Upgrade Wizard no longer ships with Visual Studio, the VBUC provides a more powerful and flexible alternative to cost-effectively upgrade your applications to .NET, take advantage of the latest technology, and streamline your development process.


Event link


 

Channel 9 video on the Visual Basic Upgrade Companion (VSIP Partner video)

12. April 2010 12:16 by Jaguilar in General  //  Tags: , , ,   //   Comments (0)

Today, as part of the Visual Studio 2010 launch, Microsoft published a video of my coworker, Esteban Brenes, doing a brief demo of the latest beta of the Visual Basic Upgrade Companion 4.0. In this video, version 4.0 of the VBUC is used to generate code that works correctly with Visual Studio 2010. This is part of the VSIP Partners CAN DO! series of videos, which can be seen in this link.

Watch the video: VSIP Partners CAN DO! | ArtinSoft Visual Basic Upgrade Companion

Visual Basic Upgrade Companion 4.0 Beta available for download

12. April 2010 07:10 by Jaguilar in General  //  Tags: , ,   //   Comments (0)

We are very happy to announce the Visual Basic Upgrade Companion 4.0 Beta. You can now download a trial from the Trial Request page. While we complete beta testing, we’ll have both version 3.0 (current release version) and the 4.0 Beta available for download. If you have the chance, we would really appreciate it if you could download the beta, and send us any feedback either through ArtinSoft’s regular support email (support@artinsoft.com) or through my blog Contact Form.

This new version contains a large number of improvements over version 3.0, including:

  • Increased productivity for migration projects, with features such as improved conversion of ByRef/ByVal parameters (specially when working with Windows APIs), TypeName/TypeOf support, improved default property conversion, generate code to explicitly release COM objects when required, and hundreds of smaller enhancements and bug fixes that greatly improve the conversion of VB6.0 code.
  • Improved the user experience by adding localization/internationalization for German and Japanese and completely redesigned the installation and license process. Installing a license is now a straightforward process (no more copying files!!), and it is now possible to install and execute the VBUC on both 32- and 64-bit versions of Windows Vista and Windows 7, as well as 32-bit Windows XP. The installation requirements were also greatly simplified, so you don’t need Visual Studio installed to install the VBUC (though it is still recommended).
    You can now also select the target version of Visual Studio to generate the appropriate Solution file (*.sln). The VBUC can generate Visual Studio Solutions for version 2005, 2008 and 2010.
  • Enhanced Grid migration, by mapping the Microsoft Flexgrid and APEX/ComponentOne TrueDBGrid to a grid that extends the native .NET DataGridView. It will no longer be required to purchase a third-party grid solution when moving from these  grid to .NET if you wish to move to 100% native .NET code without using COM Interop.
  • Improved assessment capabilities, by improving the accuracy of the VBUC Assessment Mode and making additional changes so members without specific mappings are tagged with an EWIs – in the past only members that were explicitly tagged as “Not Mapped” had an EWI.

You can read more details on the new features of version 4.0 in this page: What’s new in VBUC 4.0? Make sure you try out these new features by downloading a trial.

VBUC40UIVisual Basic Upgrade Companion 4.0 User Interface. You can now select the target version of Visual Studio,
and also note the license icon at the bottom of the window.

Error Handling Customizations

16. February 2010 10:52 by Jaguilar in General  //  Tags: , , ,   //   Comments (0)

One very common requirement for migration projects is to adapt certain error handling patterns used in a customer’s Visual Basic 6.0 code to the structured error handling provided by .NET, cleaning up the code, improving its maintainability, and, whenever possible, complying with .NET best practices.

The VBUC already converts several commonly used error handling patterns, such as the ones described in this old post. There are, however, situations where the VBUC is not able to recognize a pattern. these usually involve Goto statements, On Error Resume Next, Resume Next or some other construct usually associated with “spaghetti code”. When one of these patterns is encountered, the VBUC does a very basic transformation and generates an EWI so it can be cleaned up through manual intervention later on, such as in the following example:

Visual Basic 6.0 Code

.NET Code

Private Function <NAME>(<PARAMS>) As <TYPE> 
  Const MethodName As String = "<NAME>" 
       On Error GoTo ErrorLabel 
       <STATEMENTS 1> 
       On Error GoTo <LABEL> 
       <STATEMENTS 2> 
  CleanUp: 
       <STATEMENTS 3> 
       Exit Function 
                
  <LABEL>: 
       <STATEMENTS 4>       
       LogError(MethodName) 
       Err.Raise 16, , MethodName 
                
   ErrorLabel: 
       <STATEMENTS 5> 
       LogError(MethodName) 
       Err.Raise Err.Number, , MethodName 

End Function 
 
private <TYPE> <NAME>() 
{ 

const string MethodName = "<NAME>"; 
//UPGRADE_TODO: (1065) 
Error handling statement
(On Error Goto) could not be converted. More Information:
http://www.vbtonet.com/ewis/ewi1065.aspx
NotUpgradedHelper.NotifyNotUpgradedElement( "On Error Goto Label (ErrorLabel)"); <STATEMENTS 1> try { <STATEMENTS 2> <STATEMENTS 3> return result; } catch (Exception ex) { <STATEMENTS 4> LogError(MethodName); throw new System.Exception( ((int) 16).ToString() + ", " + String.Empty + ", " + MethodName); ErrorLabel: <STATEMENTS 5> //UPGRADE_WARNING: (2081)
Err.Number has a new behavior.
More Information:
http://www.vbtonet.com/ewis/ewi2081.aspx
LogError(MethodName); throw new System.Exception( Information.Err().Number.ToString() + ", " + String.Empty + ", " + MethodName); return result; } }

Most of the time it is possible to generate a solution that will correctly convert the error handling pattern, maintaining functional equivalence and meeting any additional coding guidelines from our customers. For the previous example, The VBUC can be customized so the generated code looks as follows:

try 
{ 
       try 
       { 
              <STATEMENTS 1> 
       } 
       catch (Exception ex){ 
              <STATEMENTS 5> 
              throw; 
       } 
       try 
       { 
              <STATEMENTS 2> 
       } 
       catch (Exception <LABEL>Ex) 
       { 
              <STATEMENTS 4> 
              <LABEL>Ex.Data.Add("ERROR",16); 
              throw; 
       } 
} 
finally 
{ 
       <STATEMENTS 3> 
}

This example makes some assumptions on the nature of the code and on the intention of the original VB6.0 developer, in particular:

  • Errors raised by  <STATEMENTS 1> should be handled by <STATEMENTS 5>
  • Errors raised by  <STATEMENTS 2> should be handled by <STATEMENTS 4>
  • <STATEMENTS 3> is cleanup code that should always be executed
  • The Exception needs to be thrown again without loosing any information

This is just an example, but the intention is to show what type of customizations can be done. The VBUC transformation engine is very powerful, and, as long as a pattern can be identified, can help you automate the solution to most VB6.0 problems.

Visual Basic 6 and Windows 7: Alternatives for Application Compatibility Webcast Recording Available

19. October 2009 07:29 by Jaguilar in General  //  Tags: , , ,   //   Comments (0)

A quick post to let you all know that the recording of last week’s webcast I did on compatibility options for Windows 7 is now online. In this webcast I briefly covered different compatibility options available for Windows 7, mentioning things like virtualization (such as XP Mode) and Remediation, and the focusing on the benefits of using automated migration tools to get the application off VB6.0 and into .NET so it can take advantage of the new APIs available in Windows 7 (Taskbar API, touch API, etc).

See the recording here

Upcoming Webinar: “Actualiza tus apliaciones y consigue el logo de Windows 7”

6. August 2009 06:57 by Jaguilar in General  //  Tags: , , , ,   //   Comments (0)

Next Monday, August 17, I will be presenting a Webinar along with Microsoft for the Latin America region on how you can use several options to get your VB6.0 applications to run on Windows 7 AND get the Windows 7 logo. The webinar will be in Spanish, and covers the business reasons for the migration, the benefits of using in the .NET Framework, alternatives, and information (+demo) of the VBUC.

Here’s the link so you can register for the Webinar:

Actualiza tus apliaciones y consigue el logo de Windows 7
Fecha: 17 de agosto 05:00 p.m. Ciudad de México
Register for the Webinar

New Case Study: Wolters Kluwer successfully migrates 3 million LOC using the Visual Basic Upgrade Companion

5. August 2009 09:05 by Jaguilar in General  //  Tags: , ,   //   Comments (0)

We just posted a new case study about how an Italian company, Wolters Kluwer Italia, managed to successfully migrate its flagship Accounting and Financial services product from VB6.0 to Visual Basic .NET, using a customized version of the Visual Basic Upgrade Companion.

This Wolters Kluwer is a case where the VBUC customizations performed by ArtinSoft helped them achieve two very important goals: first, to radically speed up the overall migration project, by having the VBUC do particular transformations that otherwise would have required manual changes, and second, to meet very specific requirements for the migration, such as using having the VBUC generate .NET code that used their own controls, do additional refactoring to the code, and other architectural customizations made possible by the VBUC engine.

Read the case study: Wolters Kluwer licenses the Visual Basic Upgrade Companion to quickly and cost-effectively modernize its flagship Accounting/Fiscal software product

Counting Duplicate and Shared Lines of Code

4. August 2009 09:48 by Jaguilar in General  //  Tags: ,   //   Comments (0)

One question commonly asked by our customers is how both duplicate (same file copied in several projects) and shared files (one copy of the file referenced from multiple projects) are counted. If you create a migration solution using the VBUC, it counts the lines of code in a project (Lines column):

This number displayed in the VBUC includes all the lines of code from files referenced in the *.vbp project. This means that it counts shared files and duplicate files each time they appear. This may increase the final amount of lines of code of the total solution. If you do need to find out the number of lines of code counting these files once, we offer you two options:

The first one is to download and run our new Visual Basic 6.0 and ASP Assessment Tool. This brand-new assessment tool considers both Shared and Duplicate files and counts both accordingly in separate columns.  As shown in the screenshot below, the Assessment Tool identifies “Potential Duplicates”, which are files that have the same name and the same amount of effective (code + design) lines of code. In practice, they are normally the same file copied over several projects. You should note, however, that there may be small changes that keep the same amount of code (assignments, calls to different functions, etc), so there is no guarantee they are exactly the same. FYI, this was done to speed up the analysis process. In the future we will add additional heuristics to eliminate the possibility of false positives.

The second option is to use the same VBUC, but run a detailed analysis using the “Assessment” option. This can be executed from the main menu by selecting Upgrade->Assessment:

This is a more exhaustive assessment than the one executed by the VB6.0/ASP Assessment Tool, and takes much longer to execute. This assessment will not create an HTML report (like the VB6.0/ASP Assessment Tool), but you can open the detailed line count report produced (Assessment_LOC_Report.xml) using MS Excel 2003 or higher.

Prepare your VB6 Code for an Upgrade

9. July 2009 11:38 by Jaguilar in General  //  Tags: ,   //   Comments (0)

When either testing the trial version of the VBUC or actually running the migration tool on your project, there are a few things that you should check to ensure the best possible conversion. These are:

  • Project root: Make sure all projects are stored under a one “root” common directory. The VBUC migrates all Visual Basic 6.0 projects (*.vbp) found in a directory structure, including subdirectories, from one common root. You can read more information about setting up the folder structure in the VBUC Quick Start Guide.
  • Third-party Components: The VBUC requires that all third party components are correctly registered. Also, very important, ensure you correctly install all licenses for the components. Not including these licenses will not allow the VBUC to load and identify the PMEs (Properties, Methods and Events) and correctly either apply the necessary maps or generate the corresponding COM Interop wrappers.
  • Compile all projects: Make sure all projects compile correctly and that all the references between the output (EXE/DLL/OCX) of a project and the referenced component in another project match up. This will allow the VBUC pick up the references automatically, reducing the amount of migration warnings and thus minimize the work required to set up the migration solution. The VBUC Quick Start Guide contains additional details on the importance of this step.

Website Updates: More Information, Get a Quick Ballpark, Download a Trial and Buy a License Online

29. June 2009 06:27 by Jaguilar in General  //  Tags: , ,   //   Comments (0)

In the last couple of months we’ve done several significant updates to the website that I think are worth commenting about. Here is a quick rundown of what has changed:

We hope you find this new information we published useful, and please add a comment to this post or send me a message with your thoughts on the new changes and if there’s anything you would like to see on our site.

Show Migration Errors, Warnings and Issues (EWIs) on Visual Studio’s Task List

This is a very simple configuration option that can really help you speed up the process of reviewing all migration EWIs (Errors, Warnings and Issues) when working with migrated code. In Visual Studio, you can use the Task List panel to keep track of a list of items (tasks) you need to go through. This Task List can be configured to show migration EWIs, as shown in the following screenshot:

For this to work, in the Visual Studio IDE, select Tools->Options from the main menu. In the Options window, navigate to Environment->Task List. Here, you’ll need to add the four types of EWIs inserted by the VBUC, along with their priority:

  • UPGRADE_ISSUE: Issues appear when there is some migrated code that is very likely to cause a compilation error. My recommendation is that you add it with Normal priority
  • UPGRADE_NOTE: Notes are basically information messages. For example, if the VBUC detects dead code, it will comment it out and add an UPGRADE_NOTE comment to make sure the developer understand why it was removed. This can be added as Low priority, since they very rarely require manual intervention after the migration.
  • UPGRADE_TODO: Partially upgraded code. These EWIs should be added as high priority, since they indicate the developer needs to perform some additional work to complete the migration.
  • UPGRADE_WARNING: Warnings appear when there is a difference in behavior between the VB6 code and its .NET equivalent. The solution provided normally works, but there are some scenarios where additional manual intervention may be required (most likely from runtime errors). I normally add them to the Task List as Normal priority.

 

With this configuration, you can very easily and quickly browse through all the EWIs in a file, and determine which ones actually require you to perform some manual work, and which ones can be either removed because the line they are tagging will work, or if their verification will be deferred until functional testing takes place.

You can read more about VBUC’s Errors, Warnings and Issues here, and about Visual Studio’s Task List at this link.

Visual Basic Upgrade Companion 3.0 Release Candidate available

A couple of days ago we made available the final release candidate for version 3.0 of both the Visual Basic Upgrade Companion Enterprise Edition and Developer Edition. You can now directly download a trial of the VBUC Developer Edition on the trial download page, or request a trial of the Enterprise Edition on this page.

I need to mention an obligatory disclaimer saying this is the final Release Candidate, so, unless we find something at the last minute, it should be the same version officially released within a week or so. We need your help to verify we won’t find anything by downloading it and trying it out. :)

I already covered some of the features of this version on a previous post. There was significant improvements in several areas from version 2.2, which should help you achieve even greater productivity on your migration projects.

Coming Soon: Visual Basic Upgrade Companion Version 3.0 with Enhancements in Automation, Features and Code Quality

20. April 2009 11:52 by Jaguilar in General  //  Tags: ,   //   Comments (0)

As I blogged before, the release of the VB Upgrade Companion v3.0 is due within the next few weeks. In this version we concentrated on three major areas:

  • Automation: We analyzed the data from several million lines of code to determine the most common causes of manual intervention, and, by making some strategic changes to the way the code is generated, managed to reduce the amount of both EWIs (Error, Warning and Information messages) and compilation errors significantly on large (>1 million Lines of Code), complex applications. Also, depending on the VB6 features used, the VBUC now automates the migration of even more smaller applications and components completely!
  • New Features: The VBUC v3.0 also contains additional features, such as the migration of the IsMissing statement and increased support for additional third party components. We are also integrating the VBUC with brand new online documentation resources that should help you as you perform the migration!
  • Code Quality: The Visual Basic Upgrade Companion always tries to generate high-quality code that looks as if it was originally written in .NET. This increases the maintainability of the migrated application, and allows developers joining the project at a later date to very quickly start working on the codebase. Because of the great differences between Visual Basic 6.0 and VB.NET/C#, however, achieving this goal is not always possible. For this release we continued increasing the quality of the migrated code, including minor refactorings to control structures, and adding things like support for translating additional error handling statements to try/catch statements.

All of these was supported by some significant changes we did under the hood, which should make it easier to add new features in the future (including customer-specific customizations) and reduced the memory footprint significantly, while increasing migration speed. Watch this space for more details as the release date approaches!

Upcoming features in the Visual Basic Upgrade Companion version 3.0

We are currently wrapping up all development effort to focus on the final testing and stabilization of the next version of the Visual Basic Upgrade Companion, both Enterprise and Developer Editions, version 3.0. For this version we focused more on architecture improvements, preparing the code base for more significant upgrades in the future. We still we managed to add some great features such as:

  • Enhanced resolution of default properties: By both improving the typing engine of the VBUC and generating additional code for runtime resolution of default properties, we were able to reduce the total amount of EWIs present in the code by 30%!
  • Improved support for API Calls: Most API calls should now work correctly. There are still a couple of issues, but they should be sorted out by the final release
  • IsMissing migration: We now correctly support the migration of the IsMissing statement.
  • Enhanced support for the migration of common controls, such as Imagelist, Listview, Statusbar, Toolbar and Treeview, to native .NET components. We now correctly convert most functionality of these controls to .NET
  • A greatly enhanced Assessment Mode to better estimate the effort required to perform a migration project
  • Significant performance improvements and memory footprint
  • Over 150 code generation improvements based on feedback from projects we’ve done, our clients and partners

We are currently conducting a limited Beta program for the VBUC Developer Edition v3.0. If you are interested in participating, drop me a line and I’ll get back to you with further instructions.

Edit: The upcoming version of the VBUC will be version 3.0 - this release represents a leap in the level of automation and additional features we managed to squeeze in, and thus deserved a new major version number. I will post additional details on the different features as the final release date approaches.

Efficiently Migrating 5 Million Lines of Code from VB6 to C#: Citigroup – Banamex Case Study Now Online

27. February 2009 02:59 by Jaguilar in General  //  Tags: , , ,   //   Comments (0)

This week we published a new case study on the migration we performed for Banamex, part of Citigroup and one of the largest Mexican banks. In this project we migrated 124 Visual Basic 6.0 and ASP applications from different divisions of the bank to C# and ASP.NET. All in all, we migrated over 5 MILLION LINES OF VB6 AND ASP CODE. This is the largest VB6 to .NET migration we’ve done so far, it was a huge success story – so much that we are now working on the migration of some other applications that weren’t originally included in the scope of the project.

You can read the details here.

Visual Basic Upgrade Companion DE Trial Download Now Available

A quick post to let you all know that we now have a trial available for download of the Visual Basic Upgrade Companion Developer Edition. To obtain the trial you need to fill in your information here, and we will email you the download link and the necessary licensing information to activate the trial.

The trial will allow you to migrate up to 2,000 lines of code simultaneously, and has a limit of 10,000 lines of code total – which means that every time you migrate some code, the amount of lines you migrated are discounted from the 10,000 total.

So don’t wait and download the VBUC DE trial now!

Remember that you can also request a trial for the Enterprise Edition of the Visual Basic Upgrade Companion at this page. You will need to run the Assessment Tool first, and based on the results we will send you a custom trial for a portion of your application.

Migrating Enumerations to .NET

11. February 2009 10:53 by Jaguilar in General  //  Tags:   //   Comments (0)

Several times I’ve mentioned the Type Inference feature of the Visual Basic Upgrade Companion. The main objective of the component that we call the “Typer” was to eliminate Upgrade Issue 1037 (Couldn't resolve default property of object ‘x’) that appeared then the VBUC wasn’t able to correctly determine the data type of a variable and consequently couldn’t resolve its default property.

Even though dealing with EWI 1037 was the design goal, having a typing mechanism in the VBUC allowed us to improve a great deal of transformations. One particular feature that benefitted from it was the migration of VB6 Enums. To illustrate this, let’s look at an example.

First, let’s see some VB6 code (doesn’t really do much except use Enums):

   1:  Public Enum Myenum
   2:     EnumValue0 = 0
   3:     EnumValue1 = 1
   4:     EnumValue2 = 2
   5:     EnumValue3 = 3
   6:     EnumValue4 = 4
   7:     EnumValue5 = 5
   8:     EnumValue6 = 6
   9:     EnumValue7 = 7
  10:  End Enum
  11:   
  12:  Dim enumUsage As Integer
  13:   
  14:  Public Sub MyMethod()
  15:  enumUsage = EnumValue1
  16:  enumUsage = 4
  17:  If enumUsage = EnumValue4 Then
  18:      enumUsage = EnumValue7
  19:  End If
  20:  If enumUsage = 7 Then
  21:      enumUsage = 5
  22:  End If
  23:  End Sub

After running the code through the VB Upgrade Companion we get this:

   1:      Public Enum Myenum
   2:          EnumValue0 = 0
   3:          EnumValue1 = 1
   4:          EnumValue2 = 2
   5:          EnumValue3 = 3
   6:          EnumValue4 = 4
   7:          EnumValue5 = 5
   8:          EnumValue6 = 6
   9:          EnumValue7 = 7
  10:      End Enum
  11:   
  12:      Dim EnumUsage As Myenum
  13:   
  14:      Public Sub MyMethod()
  15:          EnumUsage = Myenum.EnumValue1
  16:          EnumUsage = Myenum.EnumValue4
  17:          If EnumUsage = Myenum.EnumValue4 Then
  18:              EnumUsage = Myenum.EnumValue7
  19:          End If
  20:          If EnumUsage = Myenum.EnumValue7 Then
  21:              EnumUsage = Myenum.EnumValue5
  22:          End If
  23:      End Sub

The VBUC performs some very subtle transformations to improve the quality of the generated code. Let’s look at them in detail:

First of all, the usage pattern for the variable EnumUsage is analyzed by the Typer, and it determines that it is always used to store a value of the Myenum Enum. Thus, it infers that the correct data type should be Myenum instead of Integer, as seen in line 12:

  12:      Dim EnumUsage As Myenum

Since the Typer keeps track of the different ways in which a variable is used, and of the values that are assigned to it, it provides information to the VBUC so it can replace the assigned values with the corresponding enumeration. This applies even for comparisons – the code is translated from:

  16:  enumUsage = 4
  ...  
  20:  If enumUsage = 7 Then
  21:      enumUsage = 5

to (notice the if in line 20):

  16:  EnumUsage = Myenum.EnumValue4
  ...  
  20:  If EnumUsage = Myenum.EnumValue7 Then
  21:      EnumUsage = Myenum.EnumValue5

This is just one of the features that we have worked on over time to improve the quality of the code generated by the VB Upgrade Companion. It was built on top of the functionality provided by the Typer, and works with both VB6 built-in and user-declared enumerations. As shown in the example, this makes the code easier to maintain, and even looks as if it was written originally in .NET. :)

VBUC vs. the Upgrade Wizard: A Short Recap on the Advantages of Using the Upgrade Companion

Because of some queries we’ve had in the past few days, I think it is time to revisit the differences between the Upgrade Wizard that ships with Visual Studio .NET (2003,2005 & 2008) and the Visual Basic Upgrade Companion (VBUC). The VBUC is a different product, with very different capabilities than the Upgrade Wizard. We have a detailed comparison over at the Visual Basic Upgrade Companion vs. Upgrade Wizard page, but here is a brief overview of the main differences:

  • C# Generation: The Visual Basic Upgrade Companion  is able  to generate C# directly  from  the Visual Basic 6.0 source code, as an alternative to Visual Basic .NET.
  • Structured Error Handling: The Visual Basic Upgrade Companion includes features to remove unstructured “spaghetti” code and replace it with structured flow control statements in .NET. All unused labels are removed from the  resulting code. Plus  the most commonly used  “On Error  ” patterns are currently  recognized and replaced by the tool. This is important for C# migrations, as it ONLY supports structured error handling.
  • .NET Native Libraries: Instead of upgrading VB6  code using  the Visual Basic Compatibility  Libraries  like  the Upgrade Wizard  does,  the  Visual Basic Upgrade Companion  promotes  the  use  of  .NET  native  libraries whenever possible.
  • Type Inference: The VBUC contains a typing system that accurately assigns correct .NET data types to existing VB6 variables, functions, fields, parameters, etc
  • Stub generation: To ease the compilation process, the Visual Basic Upgrade Companion generates an empty declaration (stub) in a stub-dedicated source code file and into the converted project for each library element which occurs in the original application and does not have an equivalent in .NET. All the references to these not-converted elements are translated into references to their corresponding stub declarations.  This strategy does not fully resolve the lack of .NET equivalent elements, since the stubs will require manual implementation, but, it saves an important amount of time during the manual changes stage.
  • Code quality enhancements: The VBUC generates higher quality code with more mature and exact transformations. These transformations include data  type enhancements and grammar pattern transformations and detailed code improvements. A detailed explanation of these transformations can be found on the VBUC vs. UW page.
  • Multi-Project Conversion: The Upgrade Wizard is able to convert one single VB6 project file (*.vbp) at a time. Hence, if the user wants to upgrade a complex VB6 application with this tool, several considerations must be taken in order to accomplish full functional equivalence. The Visual Basic Upgrade Companion allows the conversion of multiple Visual Basic 6.0 projects. It performs a separation between the pre-processing and migration stages in order to fix problems like the use of by-ref parameters, interfaces, renaming and typing among the different projects. The pre-processor environment solves the references among projects and simplifies the overall migration process.
  • .NET Enumerations: Another  important Visual Basic Upgrade Companion  feature, absent  in  the Upgrade Wizard,  is the replacement of numeric literals assigned to several control properties with .NET enumeration equivalents when  possible,  so  that  the  generated  Visual  Basic  .NET  code  is more  legible  and maintainable.
  • 3rd Party Library Extensibility*: The VBUC  can be customized to convert any third party library to its native .NET equivalent. It ships with support for several libraries out of the box, which are detailed in the VBUC vs. VBUW document.
  • Legacy Data Access to NET*: The  VBUC  upgrades  the  legacy  data  access  models  (ADO,  RDO,  DAO,  ADOR)  to  .NET equivalents,  employing  special  transformation  rules  and  helper  classes  (for  some  specific source/target combinations). On  the other hand,  the UW generates a  target application  that still uses  those  legacy  data  access  models  to  communicate  with  the  database  via  COM  Interop wrapper calls. 
  • Custom Maps*: The Visual Basic Upgrade Companion Custom Maps extensibility, allows the user to upgrade their non-supported libraries and controls using a simple set of user-defined transformations. 
  • User declarations advanced refactoring*: The Visual Basic Upgrade Companion manages all the user declarations to perform tasks such
    as using standard Naming Conventions for the .NET languages and recognizing conflictive user-declaration names to assign new denominations (including all of its references).These tasks improve the resulting source code readability and hasten the manual change stage.
  • COM class exposure*: When this optional feature is enabled, the Visual Basic Upgrade Companion will generate attributes for the COM-exposed classes and their members, in order to keep the resulting assemblies exposed through a COM interface. This enables the resulting components to be called from other non-managed components via COM.

Make sure you download the PDF on the  Visual Basic Upgrade Companion vs. Upgrade Wizard page for additional details. Items marked with * are ONLY available in the Visual Basic Upgrade Companion (VBUC), and are not available in the VBUC Developer Edition.

Customization and Extensibility features of the Visual Basic Upgrade Companion

One of the key features of the Visual Basic Upgrade Companion (one that is not present in the Developer Edition, BTW) is that it’s functionality can be customized and extended. By doing this, developers working on a migration can have the VBUC do as much of the work as possible for them, minimizing the manual work and producing a higher quality product that satisfy both the developer’s and end user’s expectations. Performing repetitive changes to, for example, replace the data access components from VB6 (ADO/RDO/DAO) with native .NET data access (ADO.NET), is better done by the VBUC at migration time. This also applies to particular programming patterns used by organizations that need to be replaced by .NET-native patterns, and to coding conventions that vary between VB6 and .NET languages.

The Visual Basic Upgrade Companion includes three mechanisms to customize the generated code: Migration Profiles, Custom Maps and Additional Customizations.

Migration Profiles

A new feature that was introduced in version 2.0 of the Visual Basic Upgrade Companion, it gives end users control over which features and transformations to use for a particular migration, by using the concept of Migration Profiles. These profiles provide two types of rules that can be switched on/off. The first type, Code Conversion Rules, that deal with patterns applied to the code, such as generating structure error handling (try…catch) from On Error…Goto statements or applying commonly used naming conventions to the code. The second type is called Component Maps, and deal with translations from from one ActiveX component, such as a status bar or a grid, to a native version of the component.

Profiles are managed through the Profile Maintenance screen:

Custom Maps

The Visual Basic Upgrade Companion includes a “mapping” mechanism that allow end-users of the tool to define the transformation of one element of a library used in the VB6 code to a member of an assembly in .NET. This allows a migration team to identify and implement time-saving transformations, and, when combined with the implementation of an adapter for the .NET component, can speed up the migration process dramatically.

The Mappings are defined through a GUI editor launched from within the VBUC itself:

Once the mappings are defined, they can be switched on and off in the migration through the Migration Profile Maintenance Window:

Additional Customizations

ArtinSoft’s VBUC development team can also include additional complex rules in the VBUC, including customizations for items such as error handling patterns, architectural modifications, and others. These customizations also include mapping COM controls to in-house libraries, or force in-house naming conventions. This was a decision point for one of clients in the United Kingdom, Vertex Financial Services, as documented in the Vertex Omiga case study:

“Vertex decided to migrate the Omiga application to C# using a customized version of the Visual Basic Upgrade Companion, a tool developed by ArtinSoft based on artificial intelligence technology. ArtinSoft was highly recommended by Microsoft UK, and the customization of this migration tool enabled Vertex to automatically convert coding patterns and meet its preferred standards.”

These type of customizations require some modifications to the VBUC that can only be performed by ArtinSoft’s in-house team. It is a very valuable option that allows companies to get a an end product which furthers increases the return on investment from the migration.

Get your Migration Fix for &#163;199 While Supplies Last - Introducing the Visual Basic Upgrade Companion Developer Edition

Jointly with the Visual Basic 6.0 migration campaign we are launching in the UK, today we released the Visual Basic Upgrade Companion Developer Edition. This is a scaled down version of the Visual Basic Upgrade Companion, targeted at individual developers that want to migrate their Visual Basic 6.0 applications as fast and painlessly as possible. It has a license that is valid for three months and allows you to migrate an application of up to 50,000 lines of code.

The VBUC Developer Edition does have some fewer features than the fully-fledged Visual Basic Upgrade Companion. All the features that we decided to include in the Developer Edition, however, are targeted towards automating as much of the migration process as possible. So, we left out features that have been introduced by the request of our enterprise customers over the 7+ years the tool has been on the market (yep, we were already doing VB6 migrations before the official release of .NET - and it wasn't all fun with the Betas). We made it so that getting an application up and running in C# or VB.NET is as simple as possible.

Here you can see the VBUC Developer Edition in action (video recorded by yours truly :) ):

And, as an introductory offer, The VBUC Developer Edition will only cost £199 for a limited time. So why wait?

Categories