Assembly Not Referenced Error
Not sure if this refers directly to COM, but it is occurring in a COM
object I wrote, so here goes.
The application returns an ADO Recordset to an Excel application. It
is a C# application which is exposed to the COM Interop.
When creating the reference to the Interop.ADODB DLL, VS2005
automatically sets the property CopyLocal to true.
Of course, when the calling assembly tries to invoke a method which
returns the dataset, it throws a version error.
Resetting this to false seems to have no effect, the path property for
the reference is set to a copy of the DLL within the assembly.
Actually removing the dll from the assembly generates compile errors
on all the instantiations of the Recordset object. I know I'm being
stupid here, but what is the trick to force VS2005 and the CLR to use
the copy of the ADODB.DLL already on the computer rather than
including a copy with the assembly?
As I understand it, VS2005 is supposed to use the machine copy if the
DLL is registered with the GAC. When selecting the DLL from the
reference list, I do it from the COM tab of the Reference list. That
comes right out of the GAC, doesn't it?
Any help you could offer would be appreciated.
date: Tue, 22 Apr 2008 15:15:57 -0700 (PDT)
author: tomsthumb