COMInterop problem !

M

Mário Sobral

Hi !

[INTRODUCTION]

I have developed a .NET library that references another .NET library.

MyLibrary -> OtherLibrary

I then create a COMInterop wrapper assembly to use it from a VB6 project:

MyWrapper -> MyLibrary -> OtherLibrary

They are all signed with the strong key (sn.exe) and I followed all the
procedures to register the assemblies:
regasm MyWrapper
regasm MyLibrary
regasm OtherLibrary

I also added them to the GAC, for possible use by other applications:
gacutil /i MyWrapper
gacutil /i MyLibrary
gacutil /i OtherLibrary

To help reference the MYWrapper class, I got the TLB formthe assembly
(either regasm or tlbexp do it).

Opened up the VB6 project, added the references, put in the code to use the
class and it worked.

Then I copied the assemblies to another PC (with all the pre-requisites like
..NET Framework and such), and proceeded to register the assemblies, like I
did on my PC, but...

[PROBLEM]

When trying to register MyLibrary with regasm, the following error shows up:

"The located assembly's manifest definition with the name OtherLibrary does
not match the assembly reference."

I have tried everything I could think of, checking all the references in the
..NET assemblies project, removing and re-adding the references and making
sure they were right. I can't think of anything else.

Can someone help me, please ?

Thanks in advance for your time and any suggestion.


--

*****************************************
Mário Sobral

www.MarioSobral.com
www.CBRWorld.net
www.PerformanceTotal.com
*****************************************
 
L

Lifeng Lu

Did you installed the same version of .Net framework on both machine, and
copied all assemblies you built to the targetMachine?

You might want to recompile them. Before that, make sure that you clean up
all the old version of those assemblies from GAC on both machines.
 

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