Prblem with tlbimp & tlbexp RRS feed

  • Question

  • Hello,

    I have problem with error messages when I try to run following commands on Windows XP:

    regtlibv12  X.tlb
    tlbimp  X.tlb  /out:X.tlb.dll
    tlbexp  X.tlb.dll  /out:X.tlb

    When I run last command I get following error :

    "TlbExp : error TX0000 : CLR assembly 'X.tlb.dll' was imported from a t
    ype library and cannot be re-exported to a type library.  Make sure the type lib
    rary from which the assembly was imported is registered."

    Is anyone know how to solve this problem ???

    Wednesday, April 1, 2009 12:30 PM


  • What you are trying to do doesn't make any sense.  You use Tlbimp.exe to generate an interop assembly, allowing your program to use an unmanaged COM server.  You use Tlbexp.exe to generate a type library to allow unmanaged code to use your [ComVisible] managed code.  Two very different things.
    Hans Passant.
    Wednesday, April 1, 2009 1:28 PM