I have a scenario where the compiler is complaining that i am missing a needed reference.
I have 3 assemblies:
A.DLL
- public class BaseClass
B.DLL (References A.DLL)
- public class DerivedClass : BaseClass
C.DLL
var derived = new DerivedClass();
In C.DLL i am only referencing B.DLL (i need access to DerivedClass only).
The compiler gives an error, saying i need to also reference A.DLL
This completely breaks the encapsulation, and i am not sure why this is needed (since B.DLL references A.DLL).
EDIT: Bad choice of words on "breaking encapsulation". My intention was this causes what seems to be an additional compile-time constraint on this project (C.DLL) since i am only instantiating types from B.DLL, and not from A.DLL.
I would want this compile-time requirement to be removed, mostly because B and C sit in the same solution, but A does not.