Make COM Assembly Visible is a great hammer to make all public assembly types [ComVisible]. It is highly desirable that you will need to select the specific types that you want to see, for example, in your fragment.
After assembly, the assembly must be registered so that the COM client can find it. Which uses only a number to identify the object that it wants to create, a GUID, an additional search is needed to find out what the DLL implements. Registration includes a record of keys in the HKLM\Software\Classes\CLSID\{guid} registry key. You can do this yourself by running Regasm.exe /codebase /tlb , or you can leave it on the build system to do this automatically after assembling the build.
What is Registration for COM Interoperability? This is desirable because it ensures that an old copy of the DLL is automatically registered before being overwritten, which prevents registry corruption. VS needs to be run with increased access in order to have write access to these registry keys, which is one of the reasons to make it optional. Or you simply do not want to register it, which is common on build servers. I can not comment on why you sometimes do not get .tlb without additional diagnostics.
Hans Passant Sep 13 '10 at 11:43 on 2010-09-13 11:43
source share