The question is explicitly asking for information about the “Best Development tools for Upgrading from VB6.0” for a large, complex VB6/COM upgrade and second about C# or VB.NET.
A perfect “conversion” tool would help you meet the two critical goals of every upgrade
- Preserving functionality
- Taking advantage of .NET in a way
that follows your desired coding and platform dependency standards
The Tool’s role in Preserving Functionality
Large, mature legacy systems can contain thousands of code files and millions of lines of code. The effort required to fully describe and verify the functionality embodied in that much code is massive. In fact, there can be so much functional work that some technical-minded teams fail to see it at first. They spend most of their time worrying about how to take advantage of the latest .NET design, language, and framework features before they fully appreciate just how difficult it will be to preserve and verify the legacy functionality. It’s like they are fishing from the back of a huge functionality whale while worrying about catching little technical fish.
Teams that try to reproduce a mountain of code by reading, interpreting, and recoding it manually may well go blind in the process… So a critical feature of any conversion tool is to help the team read, interpret, and rewrite their code while rewriting it in a form that preserves its semantics. Computer scientists have studied the problem of reading interpreting, and rewriting source code for over 60 years and the solution they came up with is called a compiler. An effective code “converter” works like a compiler.
VB6 is a high level language: the Microsoft VB6 compiler and its runtime did myriad things implicitly: managing type inference, implicit conversions, implicit by ref, late-bound calls, dealing with nulls, goto-style error handling, designing forms, etc. A VB6 converter must also be able to recognize and store the myriad little details not explicitly in the code and it must be able to correctly express those details in .NET. An industrial strength conversion tool will have a powerful, extensible VB6 metalanguage system that allows the user to control how VB6 code is recognized and interpreted.
VB6 is also easily extensible through COM. There are many hundreds of different COM APIs in use, and that is not counting all the in-house components that typically become part of enterprise systems. The converter must be able to recognize any COM class or control used by the VB6, both in UI design and in code and express it using some other appropriate .NET API or interop. One tool I know of can even generate a .NET code framework from the COM usage information in the VB6. An industrial strength conversion tool will have a powerful COM type system that is extensible and allows the user to control how COM is replaced in the generated code.
The Tool’s role in Taking advantage of .NET
VB6 and .NET are different in many ways and so are the various APIs that support the two platforms. So, with tools or without, there will almost always be some re-design required. Furthermore, each team brings different preferences, constraints, and requirements to their project: ask 10 programs how to code something and you will get at least 10 different answers. The converter must be help the team express its unique preferences, constraints, and requirements. This includes providing repeatable, self-documenting means of modifying VB6 code before it is processed, modifying .NET code after it is generated, integrating hand written code, describing custom API replacements, directing custom code restructuring, and doing many other various dynamic and project-specific transformations as required.
Putting it all together
A large upgrade is rarely fully predicted and planned in advance. Even with extensive knowledge of both the source code and the desired .NET coding standards, there will be many problems and opportunities that emerge during the work. The source code and requirements must be allowed to change during the upgrade project. What is needed is an agile methodology that allows the
team to adapt to source code changes, experiment with different .NET coding techniques, respond to a deeper understanding of requirements, and incrementally improve their automated upgrade process over time. An industrial strength conversion tool will have the accuracy, precision, flexibility and speed to enable this type of methodology.
One more comment about Conversion tools. The most important ”tool” you will use in a .NET upgrade is your brain. You must learn .NET languages, design-patterns, and frameworks and apply what you know in your upgrade effort. The best automated tool does not decide for you how to rewrite your code: it helps you re-implement the legacy functionality according to the design you decide makes sense.
Microsoft suggests several tools in this article. VB6 Upgrade Partner Tools
VB.NET or C#
When I ask the .NET community (i.e. search the web) for information, tools, ideas, code, and help with programming problems, I am much more likely to find answers expressed in C# than in VB.NET. I also find the C# compiler is a better fit for a tool-assisted rewrite because it requires the generated code to be more internally consistent and explicitly described. Getting and keeping the build is a somewhat crude, but absolutely critical test of code quality and a key milestone in any upgrade effort. Remember that VB.NET is not VB6. This sounds obvious, but it can be hard to keep in mind because the two language look similar. This similarity can be deceiving; so IMO it is better to go to C# where you are reminded that the rules are different. Finally, C# has always been and continues to be designed for .NET; VB.NET cannot say that.
Disclaimer: I work for Great Migrations. There is a lot more to discuss. Please visit Great Migrations Documentation Portal for more articles and to get the gmStudio Trial and try an industrial strength upgrade tool for yourself.