469,963 Members | 1,327 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

Using a "COM" class

Ot
Although I think I have developed a class library properly, maybe I
haven't. When I attempt to include a reference to that class library A
which appears in the IDE when I click the COM tab after selecting add
reference, I get an error:

<quote>
A reference to 'A' could not be added. Converting that type library to a
..NET assembly failed. Type library A was exported from a CLR assembly and
cannot be re-imported as a CLR assembly.
</quote>

I am at a loss to understand what it is trying to tell me. If the stuff in
the DLL created is CLR (isn't that Common Language Runtime?) then shouldn't
a second project be able to reference the DLL by including it as a
reference?
Nov 20 '05 #1
3 2096
"Ot" <ur***@tds.invalid (use net)> schrieb
Although I think I have developed a class library properly, maybe
I haven't. When I attempt to include a reference to that class
library A which appears in the IDE when I click the COM tab after
selecting add reference, I get an error:

<quote>
A reference to 'A' could not be added. Converting that type library
to a .NET assembly failed. Type library A was exported from a CLR
assembly and cannot be re-imported as a CLR assembly.
</quote>

I am at a loss to understand what it is trying to tell me. If the
stuff in the DLL created is CLR (isn't that Common Language Runtime?)
then shouldn't a second project be able to reference the DLL by
including it as a reference?


It is not possible to use the COM wrapper of a .NET assembly in a .NET
project (please don't ask me why). Reference the assembly (*.dll) directly
(on the ".NET" folder in the add reference dialog).
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Ot

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
It is not possible to use the COM wrapper of a .NET assembly in a .NET
project (please don't ask me why). Reference the assembly (*.dll) directly (on the ".NET" folder in the add reference dialog).
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Forgive me if my questions are naive. I am somewhat new to this.

So the consumer/user of my class references the class by directly referring
to the DLL.

In the COM environment, when the consumed/used class changes (a new version
delivered) the consuming program will refer/use the changed module, right?
My program, in turn, references classes via COM that are developed in C++,
C, et al. When those programs change, I do nothing to my code.

Will the consumer/user of _my_ class experience this behavior? That is,
when I deliver a slicker version will they automatically reap the benefit?
Or must they recompile?
Nov 20 '05 #3
"Ot" <ur***@tds.invalid (use net)> schrieb
It is not possible to use the COM wrapper of a .NET assembly in
a .NET project (please don't ask me why). Reference the assembly
(*.dll)

directly
(on the ".NET" folder in the add reference dialog).


Forgive me if my questions are naive. I am somewhat new to this.

So the consumer/user of my class references the class by directly
referring to the DLL.

In the COM environment, when the consumed/used class changes (a
new version delivered) the consuming program will refer/use the
changed module, right? My program, in turn, references classes via
COM that are developed in C++, C, et al. When those programs change,
I do nothing to my code.

Will the consumer/user of _my_ class experience this behavior?
That is, when I deliver a slicker version will they automatically
reap the benefit? Or must they recompile?


Sorry, I have (almost) no experience in this.

Somebody else can help?

There is also an interop group:
microsoft.public.dotnet.framework.interop

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Mark | last post: by
6 posts views Thread by Mark | last post: by
1 post views Thread by jimmyfo | last post: by
1 post views Thread by VoTiger | last post: by
9 posts views Thread by =?Utf-8?B?QmFkaXM=?= | last post: by
4 posts views Thread by =?Utf-8?B?QmFkaXM=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.