Error adding a reference to a developed serviced component

G

Guest

I am working through tutorials covering developing serviced components. It
is appears as though they register correctly using regsvcs and do appear in
the MMC snap in. However when I attempt to use them from a project it fails
to add the reference with the messange:

A reference to xxx could not be added. Converting the type library to a
..NET assembly failed. Type library xxx was exported from CLR assembly and
cannot be reimported as a CLR assembly

I have seen this kind of error on other threads but never the explanation to
account for what is going wrong. I am sure it is a simple problem to resolve
- they all are when you know the resolution! Would someone kindly indicate
what I am doing wrong

TIA
 
N

Nicholas Paldino [.NET/C# MVP]

John,

You should not add a reference in COM to this component. Rather, you
should add a reference to the .NET assembly, and then use that. The CLR
will handle hooking up to the COM+ subsystem (which it knows it should do
since your class derives from ServicedComponent) transparently.

Hope this helps.
 

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