Blog Home  Home RSS 2.0 Atom 1.0 CDF  
CoolTechU Blog - "Reverse" Interop Registration
Technology, .NET, and Why It Rules My World
 
 Wednesday, July 20, 2005

We have a system which was written in VB6 way back when.  Several cooperative components are involved.  A couple of years ago, we rewrote the core components in .NET.  A couple of the driver modules remained as VB6 applications due to time constraints, etc., as is typical in migration.  But because these were the "calling" components, we had to resort to "reverse" interop.  Basically, we have COM calling a .NET component.

As you probably already know, this requires us to mark the .NET project with Register for COM Interop.  We mainly do xcopy deploys of our .NET applications, so call me slow or whatever, but the last step of the deployment was to run RegAsm.exe to register the generated .TLB file.  This required me to copy that utility to the destination machine (dumb, I know).  I think we got into this mode due to lack of time to research things correctly.  Installation and deployment (like documentation) always seems to be an afterthought in a fast-moving business.  Excuses, excuses...

Anyway, I finally took the time to read up on RegAsm.exe, and discovered that you can use the /regfile switch on the build machine to generate a .REG file that you can run on the destination machine to apply the required registry settings to register the .NET component for COM usage.  Very cool, and allows me to just add it to the deployment script (we're moving away from simple xcopy deploys) using FinalBuilder (a future article, by the way).

7/20/2005 3:49:30 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]   .NET  |  Trackback
Copyright © 2009 Mark Freedman. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: