473,394 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2226
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: TJ | last post by:
In C# how do you achieve pass-by-reference property declarations in the Type Library? I am writing a COM Class Library that must mimick an existing library for which the only information is the...
5
by: Tim Frawley | last post by:
I created a .NET Com Class object for use in ASP reports to export database results directly to Excel. I have it all working just find but I cannot get the Excel process to go away after the job...
0
by: Mark | last post by:
I receive the following error when instantiating a COM Class built in VB.Net: Run-time error '-2147217843 (80040e4d)': No Error information available: DB_SEC_E_AUTH_FAILED(0X80040E4D). It...
6
by: Mark | last post by:
How can I "Unbuild" a COM class? Basically, I used the "Build" command to register to COM Class. But I want to remove/unregister it. Thanks, Mark
2
by: Sakke | last post by:
Hello! We have written a GCryptoSvr.dll COM server in C++. Inside that resides WebClient COM component. WebClient CLSID is {8DC27D48-F94C-434B-A509-C3E1A3E75B9E}. When we are using that...
1
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when...
1
by: VoTiger | last post by:
Hi, i want to make my own DLL in DotNet for an Excel use. I have tried COM but i am facing a little problem... it might be normal but i hope not. Here is my problem : I have made a lot of classes...
1
by: Mayur | last post by:
This is my COM wrapper written in c#. using System.Runtime.InteropServices; namespace SAFE_NAMESPACE_NAME { #region Events raised by your COM class public delegate void Event1Handler(int i,...
9
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
4
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.