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" wrote:
> BrianS wrote:
>
> > 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 deploy this to other servers?
>
> 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.
>
> Eric
[quoted text, click to view] BrianS wrote:
> 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?
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.