you get errors like:
Error 1 Encountered multiple versions of the assembly with GUID 'ef3dc09d-efed-470b-bc2a-77aafb60e544'. Try pre-importing one of these assemblies. C:\..........\db_logger\TlbImp GUI_Creator
I got two COM object CANoe and Canalyzer both fails. The COM object failure is known my MS and wasn't fixed in VS2010 SP1.The problem is due to problem to build InterOp wrappers for the COM-object.
I managed to fix it by manually creating InterOp wrappers using tlbimp.exe
For CANoe.exe you open a commando prompt window in the same directory as the COM object in this case canoe32.exe:
C:\Program Files\Vector CANoe 7.5\Exec32>"C:\Program Files\Microsoft SDKs\Window
s\v7.0A\bin\tlbimp" canoe32.exe /out:CANoeInterOp.dll
For Canalyzer:
C:\Program Files\CANalyzer 7.1\Exec32>"C:\Program Files\Microsoft SDKs\Windows\v
7.0A\bin\tlbimp.exe" canw32.exe /out:canalyzerInterOp.dll
s\v7.0A\bin\tlbimp" canoe32.exe /out:CANoeInterOp.dll
For Canalyzer:
C:\Program Files\CANalyzer 7.1\Exec32>"C:\Program Files\Microsoft SDKs\Windows\v
7.0A\bin\tlbimp.exe" canw32.exe /out:canalyzerInterOp.dll
Then remove reference to CANoe in you application and add the reference to CANoeInterOp.dll instead.
In the code I also had to change ....CANoe.Application.... to CANoeInterOp.Application
Links: Microsoft Connect, Understand COM interop
1 comment:
Thank you so much for posting this work around, I thought I was going to have to go back to VS2005. On top of what you posted I also had to change the tlbimp.exe program to run as administrator before it would run, but after that my VS2012 project now compiles.
All the other forums and searches I looked on did not help at all.
Post a Comment