To maintain the separation of concern, I am trying to create the layered project architecture. lets consider below example.
-
ProjectAisclass libraryand has- interface
IntefaceA - Abstract Class
ClassAimplementsInterfaceA
- interface
-
ProjectBisclass libraryand referenceProjectAand has- Abstract Class
ClassBinheritClassA( PrjectA reference added in ProjectB )
- Abstract Class
ProjectChas- Class
ClassCwhich inherited fromClassBso addedProjectBas 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
ProjectCneedProjectAreference - Do I need to add all the
referenced projectall way to the hierarchical chain - How can I achieve separated design while reducing the dependency
Aucun commentaire:
Enregistrer un commentaire