Migrating from VB6 to VB.NET with Project Analyzer

April 23, 2008 – 2:21 am

Let’s Get prepared and save migration work

Do you plan to move code from VB6 to VB.NET? Upgrading to VB.NET is not just a matter of loading your existing code in it. Simply put, your code won’t run without changes. It’s essential to prepare your code before you migrate it.

You can easily start the preparations today. It makes sense to write .NET compatible code even if you’re planning to stay in VB6 for a while.

Project Analyzer and VB.NET compatibility check

Project Analyzer Enterprise Edition contains several tools that help you prepare your existing code for VB.NET. Among the most useful features are automatic dead code removal and VB.NET Compatibility Check.

  • Check that your projects are upgradable. It’s not possible or sensible to upgrade certain project or file types.
  • Evaluate the upgrade work. Find out what you need to change.
  • Remove dead code to save your efforts. It doesn’t make sense to upgrade those pieces of code that aren’t in use.
  • Prepare your declarations and syntax. Fix your form design. Plan the data structures.

Problem categories detected by VB.NET Compatibility Check
The VB.NET Compatibility Check feature analyzes your existing Visual Basic code to find features and syntax conventions that have changed in VB.NET. When it finds an incompatibility, it marks the location with a problem icon in one of the following categories.

  • Feature not upgradable. VB.NET doesn’t support this feature. You should either consider leaving the code in your current Visual Basic version, or prepare for major upgrade work. Example: web programming.
  • Fix required before upgrade. You can’t upgrade this feature as is. You will have to rewrite your code before you upgrade to VB.NET. Example: data binding, conditional compilation.
  • Fix recommended before upgrade. You will save work if you adjust your code or forms before you upgrade. Example: correct declaration of variables and class members.
  • Can be fixed before or after upgrade. The code needs to be changed. You may do it now or after the upgrade. Example: explicit declaration of procedure parameters.
  • Work required after upgrade. The code needs to be reviewed or changed, but you can’t do it before the upgrade. Example: syntax changes, changes in control object models, unsupported functions requiring complete redesign where used.

List of VB.NET compatibility issuesPopup link
Getting prepared in advance
Not upgrading to VB.NET yet? Then it’s even more important to know a little about VB.NET. With a minimum effort, you can write more .NET compatible code. When you upgrade, you have a few less things to worry about.
Download and try it now for free
Download the Project Analyzer demo. Select Options|Problem Options and enable a VB.NET related problem filter. Take a peek in the Add-ins|Enterprise Edition menu to see a compatibility report.

Popularity: 38% [?]

Post a Comment