[Mono-dev] List of referenced assemblies
monoman at gmail.com
Mon Nov 25 11:19:29 UTC 2013
That is the rule because the compiler need to know the details of the
Interface that is defined A because it is being used publicly as your
public class implements it.
As assembly references aren't transitive you need to be explicit (to embed
proper dependency versioning metadata) about which library you are
referencing types from.
Note that if your type MyClass had just a private field of that interface
type, for instance, of if MyClass was in the internal instead of public
scope the compiler would not need to have access to library A, but
nevertheless your running app would need to have it available to load and
execute code in library B.
Hope it helps,
On Sat, Nov 23, 2013 at 1:32 PM, Vassil Vassilev <v.g.vassilev at gmail.com>wrote:
> A silly question:
> I have interface IInterface defined in a library A.
> I have a class(generic) MyClass, implementing that interface in library
> I have a user of MyClass (the place I do new MyClass<sometype>()), when
> trying to compile the code using MyClass it tells me that I need to include
> not only B but A as well. To me that is strange... Is there a way to
> workaround this problem? Am I doing something wrong?
> Many thanks,
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list