Hi Bill
Although we were using VS2010, we had framework 3.5 - which didn't expose
the Embed Interop Types setting.

I tried the project with Framework 4, and changed the Embed Interop Types to
false and it appears to be working now

Thank you heaps!

Kirsten  
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Bill McCarthy
Sent: Tuesday, 22 March 2011 1:43 PM
To: 'ozDotNet'
Subject: RE: COM Interop broken in 2010

Is Embed Interop Types Off on those assemblies ?

|-----Original Message-----
|From: [email protected] [mailto:ozdotnet-
|[email protected]] On Behalf Of Kirsten Greed
|Sent: Tuesday, 22 March 2011 1:24 PM
|To: 'ozDotNet'
|Subject: COM Interop broken in 2010
|
|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



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5972 (20110321) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



Reply via email to