VB.NET conversion from an original VB application requires choosing between two design options – either re-build from scratch and thereby take full advantage of the .NET platform or fit the existing code base to run on the .NET Framework, which means running your old application on the new framework with no added functionality. Whichever you choose, developer code changes and reworks are inevitable as VB.NET is not backward compatible.

From functionality and supportability aspects, the first method of re-writing is a better choice. It assures that the full array of .NET capabilities can be harnessed for maximum functionality of your application and it will work properly in the .NET environment. Most IT Managers prefer to have the full application features available to them and to have their Visual Basic application updated to the next generation of web or modern (WFP) desktop applications. Microsoft’s own Visual Basic Programmer’s Journal recommends, in order to migrate to .NET “you should rewrite an app rather than port it to take best advantage of VB.NET’s new features and structures.”

When you go ahead with rewriting the code from scratch, there is a possibility that you may lose the logic and functionality underlying the messy code. A whole lot of knowledge is hidden beneath the legacy code that should not be thrown away. It is tough enough to read mature well-tested code written by someone than to write it, and yet reading code takes less time than re-writing code. By incrementally improving, you can make sure that the new code does not lose any important functionality. One needs to schedule conservatively and plan for many iterations when re-writing from scratch.

If you choose the latter option of migrating from VB to VB.NET, it should be performed in a systematic way consisting of a plan, identify processes, gather requirements, and eventually build the architecture of the solution. Migration to .NET should be carried out by first converting the existing application to .NET and then fixing the converted code in .NET. For this, there are many tools available to help with the migration, such as the Upgrade Wizard as well as multiple code analyzer tools. However, you will still need to expect to spend a significant amount of time working on the code. If your VB code is anything earlier than VB 6.0, you will need to first upgrade to VB 6.0, then execute a VB6 Migration to .NET. When attempting to run your newly upgraded VB code in the .NET environment, the Upgrade Wizard will launch automatically and will create a new .NET Project. Expect to find compilation issues with properties or objects that are not supported in the .NET Framework. These are issues that will need to be addressed by your developer for the application to execute properly. Once your application executes and is ready for use, it still won’t be able to take full advantage of the benefits of the .NET Framework.

Converting from VB to VB.NET will require a significant amount of effort as backward compatibility is not a high-priority goal with the .NET environment. Common Language Runtime is one of the profound changes that reinstates this fact when you move from VB6 to VB.NET. To take the best advantage of the new features in VB.NET, it is advised to rewrite rather than porting the application. But in cases where rewriting the application isn’t feasible, you can convert the VB6 code using a code analyzer tool and then extensively work on the code before loading it to VB.NET.

Contact us

Nellaiappan on Linkedin
Nellaiappan, Project Manager of Macrosoft's .NET migration offshore team has Industry experience of 12+ Yrs in developing and leading Windows based Applications using Microsoft Technologies

John Kullmann
Vice President of Marketing & Sales

Macrosoft Inc
2 Sylvan Way 3rd Floor
Parsippany, NJ 07054

973-889-0500 X 1272

Contact Us