what is type library?

T

Tee

Hi guys,

I have a problem with my VS project, it keeps saying COM Interop
registration failed. Could not find a type library for assembly 'Class1'.
If I choose to continue, everything still work fine.

If I type regasm class1.dll /tlb, it will create a .tlb file and solve the
problem, but this file will run into the VS setup project 'detected
dependencies' too, I dont want to include this file as basically I think it
is not needed (as I can get my project working fine without register the
tlb, but it just keep giving error in VS).
I could be wrong on this, but can anyone tell me what is type library, and
what is it for?
Or is there a better solution for this?

Note: I have few projects in 1 solution, all are C#, only 1 is VB, and only
this VB project is giving this COM Interop registration failed problem.


Thanks,
Tee
 
K

Ken Tucker [MVP]

Hi,

Make sure the class is marked as comvisible.

http://msdn.microsoft.com/library/d...eropservicescomvisibleattributeclasstopic.asp

Ken
-----------------
Hi guys,

I have a problem with my VS project, it keeps saying COM Interop
registration failed. Could not find a type library for assembly 'Class1'.
If I choose to continue, everything still work fine.

If I type regasm class1.dll /tlb, it will create a .tlb file and solve the
problem, but this file will run into the VS setup project 'detected
dependencies' too, I dont want to include this file as basically I think it
is not needed (as I can get my project working fine without register the
tlb, but it just keep giving error in VS).
I could be wrong on this, but can anyone tell me what is type library, and
what is it for?
Or is there a better solution for this?

Note: I have few projects in 1 solution, all are C#, only 1 is VB, and only
this VB project is giving this COM Interop registration failed problem.


Thanks,
Tee
 
T

Tee

Hi Ken,

Thanks a lot!
This solved the problem.

Anyway I am still looking for more information about type library, like what
is it for. It would be glad if you can show me some URL about it, I have
tried look for it, but too many non-relevant result from those search
engine, and MSDN as well...

Thanks a lot.
Tee
 
S

Sean Hederman

A COM type library is something that describes the COM objects held in a
DLL. Sometimes it is compiled into the DLL, somethimes it is separate (in a
TLB file). If you google "Type Library", at the very least the first 3 pages
are mostly relevant to some degree or another.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top