Implementing a COM+ interface in C# 
Author Message
 Implementing a COM+ interface in C#

Hi, I'm just starting out with C# so I apologise in advance if this is a
stupid question.

I'm trying to write a COM+ object using C#. That bit I've got covered, but
the problem is I want to write the object using an interface that's in an
existing COM+ object written in Delphi.

When I compile my C# program I get the following error:

error CS1577: Assembly generation failed -- Referenced assembly 'ADMSLogObj'
does not have a strong name

ADMSLogObj is the wrapper for the existing COM+ object written in delphi (I
created it using tlibimp).

I'm guessing I need to create a strong key for the wrapper (using sn?) but
I'm not sure how to do it.

Thanks in advance for any help or suggestions.



Mon, 19 Jul 2004 15:35:16 GMT  
 Implementing a COM+ interface in C#
Micheal,

Use 'sn -k blah.snk' to generate a key pair, then sign your assembly with
the key pair.. (al.exe or sn.exe, I forgot.. don't have VS handy)

- Chu



Quote:
> Hi, I'm just starting out with C# so I apologise in advance if this is a
> stupid question.

> I'm trying to write a COM+ object using C#. That bit I've got covered, but
> the problem is I want to write the object using an interface that's in an
> existing COM+ object written in Delphi.

> When I compile my C# program I get the following error:

> error CS1577: Assembly generation failed -- Referenced assembly
'ADMSLogObj'
> does not have a strong name

> ADMSLogObj is the wrapper for the existing COM+ object written in Delphi
(I
> created it using tlibimp).

> I'm guessing I need to create a strong key for the wrapper (using sn?) but
> I'm not sure how to do it.

> Thanks in advance for any help or suggestions.



Mon, 19 Jul 2004 16:03:33 GMT  
 Implementing a COM+ interface in C#
Ok, I've found the solution. First you need to create a key file for the
wrapper (using sn) then use that keyfile when importing the type
library (tlibimp /key:keyfile.key ...)



Quote:
> Hi, I'm just starting out with C# so I apologise in advance if this is a
> stupid question.

> I'm trying to write a COM+ object using C#. That bit I've got covered, but
> the problem is I want to write the object using an interface that's in an
> existing COM+ object written in Delphi.

> When I compile my C# program I get the following error:

> error CS1577: Assembly generation failed -- Referenced assembly
'ADMSLogObj'
> does not have a strong name

> ADMSLogObj is the wrapper for the existing COM+ object written in Delphi
(I
> created it using tlibimp).

> I'm guessing I need to create a strong key for the wrapper (using sn?) but
> I'm not sure how to do it.

> Thanks in advance for any help or suggestions.



Mon, 19 Jul 2004 16:24:13 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. implementing existing COM interfaces in C#

2. Internal Compiler Error while deriving C# class from a MC++ class implementing a C# interface

3. C# interfaces and COM interfaces?

4. COM Interop - How to pass C# uint array to COM interface which takes UINT *pArray

5. (COM+) How can I call a COM+ interface from C#/ASP.NET

6. Implementing a COM interface

7. implement a COM interface using ATL

8. Implementing COM interface in MFC SDI.

9. Implementing Another Interface in ATL COM

10. Getting COM objects that implement an interface

11. Implementing a COM Interface?

12. C# implementing C++interfaces (.tlb)

 

 
Powered by phpBB® Forum Software