Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,


I want to declare a dll, in c#, which contains an interface which is implemented in 2 separate dll's

If i would declare the interface in the containing dll then the implementing dll's will have to reference it in order to know the interface.
When creating a phase of the implementing dll's in the containing dll, the containing dll has to reference the implementing dll's, resulting in a circular reference.


Where should i declare the interface to avoid circular referencing?
and how should it be referenced?

Thank You!

What I have tried:

I have tried using an abstract class but it doesn't fit in the application structure
Posted
Updated 3-Dec-17 23:09pm
Comments
Kenneth Haugland 4-Dec-17 5:05am    
"When creating a phase of the implementing dll's in the containing dll, the containing dll has to reference the implementing dll's, resulting in a circular reference." Then move the phase out of the interface dll.

1 solution

If you want to use something in all your projects, define "Common" project, and this project should have references only to system dll, not yours. Put in this "Common" dll common interface, and use it.
There is no solution for circular reference. It cannot be.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900