[NEW RELEASE] Version 1.51 is available to registered users

clock June 4, 2013 11:06

Since early 2013 we have been distributing version 1.50 to selected customers, gathered their feedback and suggestions, and the result here: VB Migration Partner 1.51 is now ready.


There are tons of improvements in this new release, but the most important one is surely full-featured C# code generation. While our competitors are compatible with the C# language found in Visual Studio 2008, we decided to focus on C# 2010, which allows us to support modern C# features were not available in earlier language versions, most notably the dynamic type and optional parameters. These two single features, together with the many enhancements that only VB Migration Partner offers, let our users to create the most efficient and readable code a VB6-to-C# converter can possibly generate.

Here is a short and incomplete list of C# features offered by VB Migration Partner (and in many cases only by VB Migration Partner!):

C# specific

  • support for the dynamic type => faster and concise code
  • support for optional parameters => more readable code
  • ByRef parameters rendered using the out keyword if possible => faster code
  • the ability to generate method overloads for ref/out parameters avoids the need for temporary variables in method calls => concise and readable code
  • support for WithEvents variables => less verbose code
  • ability to implement an interface either implicitly or explicitly => compliance with your own programming style
  • transformation of On Error Goto into try-catch blocks (with warnings when the transformation isn't perfectly equivalent) 
  • transformation of On Error Resume Next into lambda expressions => full functional equivalence
  • preserves error codes => no need for manual fixes after migration
  • transformation of And/Or operators into either bit-wise or logical C# operators 
  • transformation of Select blocks into either if or switch blocks => more logical and efficient code 
  • Exit For,Do,While keywords in nested loops => code works as expected
  • expressions and function calls in compiler constants
  • string and math native .NET methods used if possible => compliance with .NET programming style 
VB.NET and C#
  • code generation for VS 2010 and VS 2012
  • support for .NET 3.5 and 4.x
  • improved support for User Control serialization in code-behind sections of forms => faster .NET form loading
  • simplified design-time and runtime support for scaling User Control at different screen resolution and system font sizes => no-brains compliance with .NET coding guidelines
  • positional pragmas: it is now possible to keep all pragma (including method-specific pragmas) in separated text files => less cluttered source files
  • automatici generation of AccessibleName property for .NET or custom controls => .NET apps ready for visually-impaired users
  • support for external source file editors => edit VB6 or .NET code with your favorite tool
  • many bugs fixed (of course!)

Each of these features (and of the many features that I didn't mentioned) would require a separate discussion, and I will surely devote some posts to the most interesting ones. 

For now, you can learn more about C# specific support here.


VB Migration Partner will support Visual Studio 2012

clock July 23, 2012 15:48

A few customers asked about our support for the forthcoming Visual Studio 2012, so here is the official announcement:

VB Migration Partner will add support for Microsoft Visual Studio 2012 within a few weeks after VS official release. This includes code generation for both VB.NET and C# and support for .NET 4.5.

[NEW RELEASE] VB Migration Partner 1.50 Public Beta with C# support is available!

clock June 9, 2012 19:31

VB Migration Partner with C# support has been in private beta for a few months: results and feedback have been VERY encouraging and we are now ready to make it available to all users!

Our last released version was 1.34, therefore this version should be 1.35, but we decided to jump to version 1.50 to emphasize the new C# support.

VB Migration Partner isn't the first or the only VB6-to-C# generator on the market, but for sure it features the most sophisticated engine for converting from VB6 to C#. Unlike our competitors, who still target older C# versions, we decided to generate C# code for Visual Studio 2010, so that we could take advantage of the many great features of this new version, such as optional parameters and the dynamic data type for seamless late-bound calls. The result is C# code that is far more concise, readable, and efficient that ANY OTHER tool that converts from VB6 to C#.

Here is a short and incomplete list of what VB Migration Partner 1.50 can do:

  • converts VB6 optional parameters into either C# optional parameter or method overloads; as with all VB Migration Partner's options, you can set your preferences at the project, file, or method level, therefore you can produce exactly the code that you like most.
    By comparison, other VB6-to-C# tools can only translate optional parameters into method overloads, which typically means more code to maintain in the future.
  • convert Variant and Object variables into the C# dynamic type, which means better and concise C# code that doesn't rely on clumsy and inefficient helper methods to perform late-bound calls.
    Unbelievably, two years after VS 2010 launch, our competitor still ignores that late-bound calls can and should rendered via the dynamic data type, and stubbornly generate a lot of code that relies on helper methods and Reflection to invoke a late-bound method.
  • generates out instead of ref parameters if possible, thus allowing the C# compiler to generate faster method calls.
    No other VB6 conversion tool has this feature.
  • converts Select Case blocsk into either switch blocks (if possible) or if..else if blocks (in the most general case); switch blocks are preferred to if..else if blocks because the C# compiler can optimize them into jump tables, whereas if...else if blocks require that a given expression must be re-evaluated many times.
    As you might have guessed, no other VB6 conversion tool can generate efficient switch blocks.
  • can optionally generate method overloads to account for ref parameters that receive expressions and constant values; this feature alone dramatically simplifies the code that is needed to call the method.
    By comparison, other VB6-to-C# generate tons of temporary variables for each method call, a technique that makes the code more verbose and in some cases generates compilation errors.
  • it can generate an interface implementation either implicitly (with public methods) or explicitly, which helps keeping the object model tidy and elegant.
    Other converters can only generate implicitly-implemented interfaces.
  • convert an On Error Goto statement into a try-catch, with a warning if the try-catch block isn't perfectly equivalent to the original VB6 code.
    Other converters do the same, but never emit a warning.
  • convert an On Error Resume Next statement into a series of lambda expressions, with you deciding whether this option is applied at the project, file, and method level.
    Other converters offer this feature only at the project level, which gives you no control about where the conversion should or shouldn't be applied.
  • refactor Gosub calls into separate private methods.
    No other converter has this important feature, which VB Migration Partner has since 2008.
  • gives you control over which .NET methods should be used instead of helper methods (defined in the support library), and where the replacement is OK.
    Other converters provide this option only at the project-level, which often leads to a behavior that isn't equivalent to the original VB6 code.
  • convert from ADODB to ADO.NET, including support for server-side SQL Server cursors, thanks to our ADOLibrary.
    No other convert even comes close to this!

As if all this weren't enough, remember that VB Migration Partner 1.50 generates C# project that use our feature-rich support library, which perfectly mimics the VB6 behavior and prevents you from wasting weeks or months trying to duplicate the behavior of the application being migrated. This includes full support for graphic methods, drag-and-drop, data-binding, weird Windows API methods, subclassing, etc. What can you ask for more?

VB Migration Partner 1.50 Beta is available to all registered users, together with white papers that contain tips and recommendations for whoever wants to convert VB6 projects to C#. We are in the process of updating all our online docs.

Happy New Migration Year

clock January 11, 2012 07:14

I know, it's been a long time since my last post, which followed version 1.34, the first release that officially supports ADODB-to-ADO.NET conversion.

I have a good excuse for this absence, though: we have been working hard on the next major release VB Migration Partner, which will include support for VB6-to-C# migration. We are very excited about this new great feature, and look forward to releasing the first beta release to our registered users.

Converting VB6 to C# is way more complex than converting to VB.NET. Here are just a few of the VB6 features that require special treatment under C#:

  • Late-binding calls
  • On Error Goto, On Error Resume Next and Resume
  • Option Strict Off
  • Modules and global variables
  • Static local variables inside methods
  • With...End With blocks
  • Select Case blocks (C# switch blocks don't allow <, <=, >, >= and TO operators)
  • ref/out optional parameters (C# only supports by-value optional params)
  • Date constants and optional Date parameters (both are unsupported under C#)
  • Multiple default properties with arguments (C# only supports one indexer per class)
  • WithEvents variables
  • #IF and #ELSEIF blocks (C# doesn't support operators in compile-time expressions)
  • ... and counting

The good news is that VB Migration Partner will be able to correctly migrate all these features (and many others) and will generate code that contains fewer compilation errors and is more efficient than any other VB6-to-C# converter, including those that have been on the market for years.

VB Migration Partner also leverages the C# features that are missing in VB.NET, for example it generates out parameters instead of ref parameters when possible and can emit both explicit and implicit interface implementations, a choice that no other tool provides. As for all other VB Migration Partner features, and unlike other migration products, these options can be controlled via pragmas at the solution, project, file, and method-level, thus you can always generate that C# code that matches your programming style.

We don't have an exact release date yet, but we hope it to be "very soon". Just stay tuned!