Groups | Blog | Home
all groups > dotnet component services > january 2005 >

dotnet component services : Reference COM+ in VB.Net


BrianS
1/26/2005 8:27:06 AM
What is the proper way to reference a COM+ component in VB.Net? I've created
a class library installed to COM+, put in the GAC. The only way to get my
client to work was to reference the dll in c:\program files\complus
applications\. This doesn't seem to be the correct approach. How would I
Eric
1/26/2005 10:56:59 AM
[quoted text, click to view]

The reference folder isn't related to the deployment folder. It's handy
to keep DLLs in a convenient folder to make it easier to reference them
at design time.

A managed COM+ DLL has to be installed in the GAC for execution. This
ensures it will always be found.

There's a way to modify machine.config to specify another path, but
this isn't recommended.

BrianS
1/27/2005 7:25:06 AM
Ok. I'm still confused. When I try to reference my COM+ component (that is
installed in the GAC) it doesn't show up in the Add References box under
..Net. How do I refernce this GACed assembly?

We have a common server component that is deployed to multiple servers and
is hosted in COM+. When we deploy new client apps to these server, we must
use theis COM+ component. The only way i was able to get the client to work
was to also deploy a copy of the COM+ component with the executable. This
doesn't seem like the correct approach because the whole purpose of this COM+
app was to centralize business logic.

Please advise.

[quoted text, click to view]
Eric
2/10/2005 1:04:25 PM
[quoted text, click to view]

You have to use the COM tab if you want to use COM Interop to access
this assembly (which would be inefficient for a .NET app, but possible).

If you want to set a direct reference to the COM+ DLL (which is coded
in C# or VB.NET), you'll have to browse to find it. Since this does not
involve COM, this is a designtime reference that has nothing to do with
deployment. You only need to have a copy of the DLL in a local folder
at design/build time. Runtime will always use the GAC'd assembly.

AddThis Social Bookmark Button