Put COM dll in GAC?

C

Curious

We have a .NET program that interacts with a COM+ program.

The installer of the .NET program puts the .NET assemblies in GAC.
However, the installer of the COM+ program also puts the COM .dll file
in GAC.

I believe GAC is a storage for .NET assemblies, but not for COM .dlls.
Therefore, the COM .dll should not be installed in GAC. Am I right?
 
M

Mattias Sjögren

I believe GAC is a storage for .NET assemblies, but not for COM .dlls.
Therefore, the COM .dll should not be installed in GAC. Am I right?

Right, and I don't understand how the installer managed to put COM
library there in the first place if it's not an assembly.


Mattias
 
C

Curious

I've heard an argument that since the .NET assembly uses the COM dll
via interop, the COM dll must be put in GAC in order for the .NET
assembly to be able to locate it. Is that true?

I don't think COM dll should be put in GAC in any situation because
GAC is for storing assemblies only, period. Am I right?
 
M

Mattias Sjögren

I've heard an argument that since the .NET assembly uses the COM dll
via interop, the COM dll must be put in GAC in order for the .NET
assembly to be able to locate it. Is that true?

No. COM uses the Registry (or manifests in case of registration free
COM) to locate the server.

I don't think COM dll should be put in GAC in any situation because
GAC is for storing assemblies only, period. Am I right?

You're right that the GAC is only for assemblies. But managed
assemblies can be COM servers too.


Mattias
 
C

Curious

Hi Mattias,

You're right to say that CMO dll is located through registry because
the register tells the location of each registered COM dll.

It's ridiculous to say that the assembly can't find the COM dll unless
the COM dll is put in GAC. I can't believe it!

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top