Error adding a reference to a developed serviced component

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top