Announcing VBUC 6.3 with fewer compiler errors
by John Browne, on Mar 23, 2015 5:58:00 PM
The same things that made VB6 such a wildly popular development environment make it tough to modernize to a more strongly-typed language like C#. Plus (let's be honest now) a lot of VB projects are not exactly perfect examples of how to program. You've got syntactic weirdness, cross project dependencies (think of a plate of linguini--that's what the dependency analysis graph looks like), diving into Windows API calls via Pinvoke, and more.
Years ago Microsoft came to us to build a tool to automate much of the effort in taking those VB6 apps to .NET. Our Visual Basic Upgrade Companion (VBUC) in an earlier form was part of Visual Studio and literally tens of thousands of developers have migrated billions of lines of VB6 code to C# (or VB.NET). But it's no secret that the process isn't exactly trivial; in many cases once the migration was complete the resulting .NET code would throw a lot of compiler errors and warnings that had to be fixed.
The good news today is we're announcing a new version of VBUC that eliminates a lof of those errors. I'll provide more specifics about what we have changed in a future blog post but here are a few things that have been improved:
- Structs with fixed length strings
- Duplicate (shared) namespaces across projects
- WinAPI calls (Pinvoke)
- and more.
Does it help? Here are three actual real-world examples we ran as validation tests (these are all very large ie >100KLOC VB6 apps). The numbers represent the reduction in compiler errors comparing the output of VBUC 6.3 to 6.2:
- Customer with a complicated multi-million line app went from 1527 errors before; 63 errors after, a whopping 96% reduction
- Customer with a nearly 1 million line app and thousands of forms went from 1036 errors before; 339 errors after - a 66% reduction
- Customer with a million line app got a 46% reduction in errors.
Now we can't guarantee you will see results like these--it depends on way too many unknowns. But it's worth trying on your workload if you haven't migrated it yet. The three cases above are actual production apps with typical VB6 line-of-business artifacts and patterns. Probably they won't be that different from what you have on that old app of yours. Each percentage point of reduction of compiler errors equals hours and hours of saved time for you.
We'll continue to improve here in future releases. There's still some more fruit on the tree to be picked, although probably most of the low-hanging stuff is already in our basket.
You can get the latest version here and try this yourself. We'd really like to hear from you about how it works on your VB6 app.