Hi All

 

I am working with some other co-developers on a VB6 upgrade project, which
we are tackling by using COM Interop.

Now we have upgraded to Dot Net 2010 we are experiencing problems.

We have VB6 DLL files called  jtNodes, jtBusObjDataTran, and
jtBusinessObject  

My collegue describes the problem as follows;


I am adding the COM references by importing the libraries from the COM tab
in the standard VS 'Add Reference' dialog. This procedure works flawlessly
in VS2008: the project compiles and the unit tests pass.

 

In VS2010 we have two problems that cause the project to fail to compile:

1.      After initially adding the reference to jtBusinessObject, tlbimp
complains that it "encountered multiple versions of the assembly with GUID
'000204ef-0000-0000-c000-000000000046'. This one can be worked around by
removing the jtBusinessObject reference and re-adding it after the
jtBusObjDataTran reference is added.
It is apparently a regression in 2010 and related to the fact that both
Interop.VBA.dll and Interop.VBRUN.dll are generated from the VB6 runtime
DLL.
2.      After the work-around in (1), all variable declarations of types in
jtBusinessObject that implement the jtNodes.jtSimpleNode interface fail to
compile with the error: "The type 'jtNodes._jtSimpleNode' is defined in an
assembly that is not referenced. You must add a reference to assembly
'jtNodes, ...'." The assmebly is referenced though. Indeed, if you remove
the reference to jtNodes then other compile errors are reported: "The type
or namespace name 'jtNodes' could not be found (are you missing a using
directive or an assembly reference?)".
Examining the jtNodes typelib using the OLE/COM viewer shows that the
interface _jtSimpleNode exists.
All the COM dlls are compiled together.

Any ideas ?

 

Thanks

Kirsten

Reply via email to