[英]Can Visual Studio/Tools show me the Circular Dependency Graph when I add a reference to a project?
I am working with a solutions having large number of projects. 我正在使用具有大量项目的解决方案。 I am trying to refactor some peices into Common libraries. 我试图将一些peices重构为Common库。 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. 我试图从我的VS解决方案中删除未使用的引用,但仍然存在循环依赖。
Are you aware of any VS extensions or external tools that can help me know the circular dependency. 您是否了解任何VS扩展或外部工具可以帮助我了解循环依赖性。 I have Resharper too but I am not aware if the Code Cleanup can help me for this issue. 我也有Resharper,但我不知道Code Cleanup是否可以帮助我解决这个问题。
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
. 至少在VS 2015 Enterprise中,您可以在Solution Explorer中右键单击您的解决方案,然后选择Show Project Dependency Diagram
。 This will load a diagram of the dependencies within your solution. 这将加载解决方案中的依赖关系图。 Very useful for large solutions. 对大型解决方案非常有用。
“右键单击项目” - >“项目依赖项”并检查是否在此处设置了依赖项,因为这可能是您遇到问题的原因(当然我假设您在“参考”中没有循环依赖)
There is a similar question, with a suggested tool in: c# : Utility to find circular references / compile in correct order? 有一个类似的问题,有一个建议的工具: c#:实用程序以正确的顺序查找循环引用/编译?
The tool: http://www.ndepend.com/features/dependency-cycles#DependencyCycle 该工具: http : //www.ndepend.com/features/dependency-cycles#DependencyCycle
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.