Using .NET-created components

J

John Spiegel

Hi all,

Like many of my questions, I'm working through a book's examples. Topic at
hand is component services and I'm trying to use a component built earlier
in the chapter that was built and registered. When I attempt to add a
reference to it in another project, it shows up as a COM object, as I would
expect, but I receive the error message indicating:

"A reference to 'filename' could not be added. Converting the type library
to a .NET assembly failed. Type library filename was exported from a CLR
assembly and cn not be re-imported as a CLR assembly."

Which makes some sense to me. I suppose my question would be: Can you ever
add a COM reference to a wrappered .NET component? Could it pertain to
having since added the component to the GAC? The book MIGHT be written to
the 1.0 framework. Could this be something that changed with 1.1?

I've worked literally hundreds of examples by this author and he's seemed to
rarely if ever make this sort of mistake.

TIA,

John
 
G

Guest

Hi all,
Anyone found answer for this problem. Please let me know as soon as possible.
I am facing the same problem.

Thanks & Regards
Kavita
Hi all,

Like many of my questions, I'm working through a book's examples. Topic at
hand is component services and I'm trying to use a component built earlier
in the chapter that was built and registered. When I attempt to add a
reference to it in another project, it shows up as a COM object, as I would
expect, but I receive the error message indicating:

"A reference to 'filename' could not be added. Converting the type library
to a .NET assembly failed. Type library filename was exported from a CLR
assembly and cn not be re-imported as a CLR assembly."

Which makes some sense to me. I suppose my question would be: Can you ever
add a COM reference to a wrappered .NET component? Could it pertain to
having since added the component to the GAC? The book MIGHT be written to
the 1.0 framework. Could this be something that changed with 1.1?

I've worked literally hundreds of examples by this author and he's seemed to
rarely if ever make this sort of mistake.

TIA,

John

User submitted from AEWNET (http://www.aewnet.com/)
 
V

Ventilj

Hi. Try to add reference to dll, not tlb in References (using Browse).

Regards, Vitaliy


-
Ventil
 

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