TlbImp2.exe Feature Request: Automatically extract namespace and type library name, and apply it to the output file

Feb 6, 2009 at 4:55 AM
Hi.

Thank you for TlbImp2.exe.

I would like to request a new feature:

The ability to automatically extract the namespace and type library name, and apply it to the output file.

For example,

I would like to run "TlbImp2.exe MyCOMFile.dll" and have it automatically create "Interop.TLBName.dll" and use the namespace as it is applied in the type library.

Thank you very much.  :)
Developer
Apr 20, 2009 at 4:44 PM
Hi,
Thank you for your suggestion. Currently TlbImp2 does use the type library name as the output assembly name. Using your example, "TlbImp2 MyComFile.dll" will create "TlbName.dll". The reason we are not creating "Interop.TlbName.dll" is that 1) It would break existing applications that expect "TlbName.dll" 2) The assembly name would be inconsistent with the namespace, as with such dll you would expect the namespace to be "Interop.TlbName", which is actually "TlbName". Could you please explain why existing TlbImp behavior doesn't work for you and could you please provide specific scenarios for us to look into?

Thanks,
Yi
Developer
Apr 27, 2009 at 6:04 AM
For namespace concern, you can use tlbimp /namespace instead.