I'm having a little trouble deploying a .NET DLL, and I was wondering
if anyone here could help.
Basically, I've built a DLL to expose some .NET components to COM.
After building the DLL and running "regasm /tlb" and "gacutil", I can
call these components from VB6 on the development machine without any
problem.
The problem arises when I try to deploy this DLL to another machine and
try to call the code from VB6. Once again, I'm using "regasm /tlb" and
"gacutil" to ensure that the DLL is registered with COM. In this case,
Visual Basic "sees" the COM object (i.e., it shows up in the
"References" dialog box under "COM"), but I can't seem to access any of
the NET components. In other words, Intellisense doesn't know about any
of the classes or interfaces declared in the COM object, and trying to
invoke any of these components gives compile-time errors.
What step am I missing/what am I doing wrong?
--Dave
Phil Wilson - 06 Apr 2006 20:05 GMT
Regasm /tlb generates and registers a type library. I think you're finding
that it is not registering the COM classes in your .NET assembly. That's
easily checked if you have specified a GuidAttribute for the class - see if
it's in the registry at HKCR\CLSID\{Guid}.

Signature
Phil Wilson [MVP Windows Installer]
----
>
> I'm having a little trouble deploying a .NET DLL, and I was wondering
[quoted text clipped - 17 lines]
>
> --Dave
Wayne Sepega - 10 Apr 2006 14:02 GMT
I was having the same issue, here is what I found (with some help from the
group)
If you are using .net 2.0, you assemblyinfo.cs has [assembly:
ComVisible(false)], this makes everything non com visible. The help says by
default everything is ComVisible, but with the attribute set to false this
is not true.
Also regasm /tlb says it generates a TLB and registers the assembly. It
creates the TLB OK, but no registration. Just run regasm Assembly.DLL to
register your assembly.
Changing the two items above hopefully will get your assembly registered and
useable.
Thanks
Wayne
> I'm having a little trouble deploying a .NET DLL, and I was wondering
> if anyone here could help.
[quoted text clipped - 16 lines]
>
> --Dave