This blog is where I post about my consulting work with Microsoft Technologies, and other random tidbits that don't fit in my Photo Blog or my Iraq Blog.

Wednesday, June 18, 2008

VB6 to VB.NET 2005 migration wizard issue: Untranslated statement

Here is the evil VB6 to VB.NET 2005 migration issue of the day:

The migration wizard generates about a zillion 'UPGRADE_xxxx comments in the the migrated .NET code, and many of the them are pretty trivial. On our current project we've gotten a little complacent about most of the ones that aren't "'UPGRADE_ERROR:", some of the "'UPGRADE_WARNING:" messages are actually critical code breakers too.

I just discovered that we have a few of these sprinkled through our code:
'UPGRADE_WARNING: Untranslated statement in . Please check source code.
This means that the Migration Wizard LEFT OUT some code it didn't understand, and you need to go back to the VB6 source, and copy and paste it into .NET!

Fortunately this doesn't happen very often (16 occurances in 956,000 lines for us), but it leads to some ugly bugs if you don't search for all occurances of the warning message and fix them.

No comments: