Blog

Maintaining Legacy Custom Visual Studio Software

Maintaining Legacy Custom Visual Studio Software

I recently had the experience of working on a Visual Basic.NET 1.1 application that our company created a number of years ago.  This brought the whole issue of maintaining legacy code into sharp focus.  Legacy industrial software could easily take up several blog entries on its own so we will focus specifically on Visual Basic 6 and .NET (Visual Basic.NET or C#).

For a blog entry on working with legacy hardware, see this blog entry.

VB6

I still encounter VB6 applications in the real world.  There are a number of challenges with VB6 applications, starting with the fact that it is difficult to install the VB6 development environment on a Windows XP SP3 machine and Windows 7 is not an option.  (NOTE: As of October 2010, Microsoft no longer sells Windows XP).   VMWare and VirtualPC are both options for installing the development environment on an older version of Windows.

A larger challenge is that third-party ActiveX components were often used in VB6 applications to accomplish tasks that could not be accomplished in the base development environment.  These components are frequently no longer available and may be impossible to license, leaving the application impossible to edit without significant rewrites.

The worst case scenario is that the source code may have been lost or the last available version may not be the final version of the code.  With modern source code control (SCC) mechanisms like Tortoise SVN this problem is alleviated but SCC was not as widely or effectively used when VB6 applications were in active development.

.NET

The .NET development environment was a dramatic shift from the prior development model, especially for developers used to VB6.  However, the early versions of the .NET framework (1.0, 1.1) were missing critical features like serial port support.  The user interface components in these early versions also had a long way to go before they had enough features  to forego third party grid controls and the like.

Just like with VB6, earlier versions of .NET (prior to 2.0) will not install on Windows 7 and only the latest versions (3.5 and 4.0) seem to install without problems.  That said, Visual Studio 2010 will support anything built in Visual Studio 2005 (.NET framework 2.0) and newer.

If you have the installer for a .NET 1.0 or 1.1 application, it will probably install without too much trouble on a modern operating system.  It is advisable to attempt updating these legacy applications to a current version of the .NET framework in Visual Studio 2008 or 2010; the conversion is quick and easy and any issues caused by the newer framework versions are often minor and easily resolved.  Microsoft's support of every version of .NET since 2.0 in each subsequent release of Visual Studio has dramatically increased the long term maintainability of projects built on the .NET framework.

Applications built in the .NET framework 2.0 or higher have no current issues other than any reliance on third party components that may affect the application if it that component is no longer available or able to be licensed.  Where possible, it is not a bad idea to keep the application on the most recent version of the .NET framework so that it is not susceptible to losing on a future version of Windows.

Tips

  1. Make a backup image of your system and test it.
  2. Ensure that your integrator or engineers are using SCC and are diligent about making sure the latest working version of the code is always committed to the SCC repository.
  3. Copy the program directory and any setup files out of your system in case an image is unavailable.  Make absolutely sure you have a copy of whatever database, probably MS Access or SQL Server Express based, that might exist in the system.
  4. Make sure that any source code, install files, documentation and other relevant materials are in an accessible and known place. 

In summary, VB6 applications are becoming much more difficult to support but modern virtual machines will allow us to support those applications for the foreseeable future as long as the correct source code is available.  Many .NET applications can be converted to the current .NET version allowing for a longer period of supported operation.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above: