I am working with a solutions having large number of projects. I am trying to refactor some peices into Common libraries. However, while adding some project reference, I get the circular dependency error. I have tried to remove the unused references from my VS Solution but circular dependency still exists.
Are you aware of any VS extensions or external tools that can help me know the circular dependency. I have Resharper too but I am not aware if the Code Cleanup can help me for this issue.
In software engineering, a circular dependency is a relation between two or more modules which either directly or indirectly depend on each other to function properly. Such modules are also known as mutually recursive.
To handle the problem of circular references in C#, you should use garbage collection. It detects and collects circular references. The garbage collector begins with local and static and it marks each object that can be reached through their children. Through this, you can handle the issues with circular references.
If you click on the references for that project, it will have a yellow triangle under it. Those are your circular (or other errors) references.
This is an old question, but since it doesn't have an accepted answer...
In at least VS 2015 Enterprise, you can right click on your solution in the Solution Explorer and select Show Project Dependency Diagram
. This will load a diagram of the dependencies within your solution. Very useful for large solutions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With