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 migration show stopper of the day: Ocx's with runtime licensing

Apparently the VB.NET 2005 Migration Wizard doesn't know how to migrate runtime licensing keys for Ocx controls.

Steps to reproduce:
  1. Create a one page hello world app in VB6, and add an Ocx that requires a runtime license.
  2. Migrate the app to VB.NET 2005, and compile it on a workstation with the appropriate design time license installed (I've tested this with several older Farpoint controls).
  3. Run the .NET app on the developer workstation that built it. It runs fine.
  4. Copy the compiled application to a test workstation that does not have the design time license installed, and try to run it. It fails with a license not found error.
Work arounds (both very painful):
  1. Delete each offending control in a .NET form, and then re-add it (by drag and dropping it on the form in the designer). This will cause the runtime license to be created, but you need to rename, resize and reconfigure the control. Repeat this process several thousand times...
  2. You can also copy known good OcxState data from another form with the same type of control into the *.resx files for the .NET forms. The advantage of this approach is that you don't have to rename and reposition the control on the form, but you still have to manually restore other formating and configuration properties.
Bottom-line: This is a huge PITA. I really hope that there is another fix that we haven't discovered yet.

No comments: