Home All Groups Group Topic Archive Search About

Can't add a reference to the specified file.

Author
21 Apr 2006 7:38 PM
Al
In VB 2005 I created Windows Class Library with a single class, put a check
mark at Register for COM interop, compiled it. When I'm trying to add a
reference to this dll in VB6 project I get an error 'Can't add a reference
to the specified file'.
What am I missing.
My goal is to use this dll with both VB2005 and VB6

Thank you
Al

Author
21 Apr 2006 10:11 PM
Herfried K. Wagner [MVP]
"Al" <a*@newsgroups.com> schrieb:
> In VB 2005 I created Windows Class Library with a single class, put a
> check mark at Register for COM interop, compiled it. When I'm trying to
> add a reference to this dll in VB6 project I get an error 'Can't add a
> reference to the specified file'.

Checking the option "Register for COM interop" will create a TLB file for
the DLL.  Instead of referencing the DLL file, reference the TLB file from
within the VB6 project.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>