To maintain the separation of concern, I am trying to create the layered project architecture. lets consider below example.
-
ProjectA
isclass library
and has- interface
IntefaceA
- Abstract Class
ClassA
implementsInterfaceA
- interface
-
ProjectB
isclass library
and referenceProjectA
and has- Abstract Class
ClassB
inheritClassA
( PrjectA reference added in ProjectB )
- Abstract Class
ProjectC
has- Class
ClassC
which inherited fromClassB
so addedProjectB
as reference inProjectC
- Class
Now issue is, in ProjectC
I am getting error The type ClassA is defined in an assembly that is not referenced
Questions is
- Why
ProjectC
needProjectA
reference - Do I need to add all the
referenced project
all way to the hierarchical chain - How can I achieve separated design while reducing the dependency
Aucun commentaire:
Enregistrer un commentaire