Thursday, February 28, 2008

Can't find your .Net dll in the VB6 Project References list?

I had created a new .Net Dll and done everything right, but couldn't for the life of me find the DLL in the VB6 references list. Everything looked fine in the registry with the HKEY_ROOT/CLSID and HKEY_ROOT/TYPELIB stuff there OK with the right Guids etc.

Normally you find it in the References list under the dll name eg. MyDll.dll would be called "MyDll" in the list. BUT, if you put a description in the .Net project file (Properties-Application-Assembly Information, the "Description" box), then that is the name that will appear in the References list, and also the name that will we shown under the Type Library list in the OLE View tool.

Moral of the story? Don't use the .Net Assembly Description field for COM compatible DLLs! Damn, that cost me hours!

No comments: