Referencing assembly from another COM enabled assembly

zeidman

New member
Joined
Mar 11, 2009
Messages
4
Programming Experience
5-10
I have written a .net assembly which plugs into to a third party COM application. The .net assembly is COM visible to the third party application. However this .net assembly references other regular assemblies. If I put these assemblies in the GAC the COM visibile assembly sees them without a problem. However for various reasons I do not want to put them into the GAC but I cannot get my COM visible assembly to see the other assemblies when they are in other locations. I have tried putting them in the same directory as the COM visible assembly. I have tried putting them in the same directory as the third party app's exe but neither of these work. Is there something I am missing here?

Thanks

David
 
Thanks for that. As I said when the regular .net assemblies are in the GAC then the COM visible .net assembly can see them. However they cannot see them even if I use the codebase parameter. Are you suggesting that the regular assemblies have to be COM visible too in order to be seen by the other COM visible .net assembly?

In general how does a .net assembly see other .net assemblies? There is no reference to their file name and they are not registered in the same way COM dlls are. Is it by name alone?

David
 
Are you suggesting that the regular assemblies have to be COM visible too in order to be seen by the other COM visible .net assembly?
No, a type only need to be COM visibly if it is consumed from COM. The COM visible library here runs by the managed CLR and consumes managed assemblies.
In general how does a .net assembly see other .net assemblies?
How the Runtime Locates Assemblies
VB.NET:
. However they cannot see them even if I use the codebase parameter.
Following the procedures described should be sufficient, because that was all I did and it works for me.
 
Thanks for your help. I think that I have resolved the issue.

What was happening was that the regular .net assemblies were not being seen because the version number was not exactly the same. My VB2008 project was referencing one version number and I was copying over an older version. Now I have the correct versions it can see them as expected.

Thanks again

David
 
Back
Top