OK, I have a VB.NET Component that is COM Interopped so it can be
called from a VB6 COM+ DLL.
I have a setup project that places my .NET DLL into the GAC and
registers it. It also registers the associated type library (which
I've put in the system32 directory for now, although I understand I
can use a resource file to avoid putting it on my deployment target at
all).
So, what I end up with is my DLL in the GAC, and the relevant entries
in the registry so I can call my component from my VB6 COM+ DLL.
So, now how can I use REGSVCS in a custom action to register my GAC'd
component with COM+? Bearing in mind that the only copy of my .NET DLL
on my deployment target is only found in the GAC.
Put another way, how should I register a GAC'd .NET DLL with COM+, if
the only copy of the .NET DLL on the deployment box is in the GAC?
DJM - 18 Mar 2004 18:26 GMT
Register the copy in the GAC. In fact, I've found that's really the only
way you can get objects in COM+ that can be referenced from a .Net assembly
without keeping the .dll local.
You'll want to shell to a DOS prompt so you can browse the
c:\Windows\assembly directory without having Explorer try to show you a
fancy web page, because you'll need the full path to the dll file. Then run
something like:
regsvcs /nologo
%SYSTEMROOT%\assembly\gac\BF.Order\1.0.0.0__24d36ca7bfa0e6b0\BF.Order.dll
Alternately, you may be able to get away with lazy registering. It would
require that the first execution of the object is done by an
Administrator -- maybe have your setup script (which ideally should be run
by an Admin anyway) attempt to start the object itself so that lazy
registering will occur.
> OK, I have a VB.NET Component that is COM Interopped so it can be
> called from a VB6 COM+ DLL.
[quoted text clipped - 14 lines]
> Put another way, how should I register a GAC'd .NET DLL with COM+, if
> the only copy of the .NET DLL on the deployment box is in the GAC?