Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / April 2006

Tip: Looking for answers? Try searching our database.

Deploying .NET COM wrapper

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rosedb0@gmail.com - 06 Apr 2006 19:35 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.