views:

41

answers:

1

If I have the follwing assemblies:

MyComVisibleApi: a .Net assembly that is used by a VB app

MyReferencedAssembly: a .Net assembly referenced by MyComVisibleApi

Does MyReferencedAssembly need to be ComVisible if its functionality is never directly referenced by the VB App?

Thanks!

+2  A: 

You shouldn't have to make MyReferencedAssembly ComVisible unless you use types from MyReferencedAssembly in the public signatures of MyComVisibleApi. Public signatures include properties, method parameters and return types.

There is also a special case: if you derive a ComVisible type from a type that is not ComVisible, public base class members will be exposed to COM as members of the derived class unless those members are individually [ComVisible(false)].

Jeffrey Hantin