简体   繁体   English

当我添加对项目的引用时,Visual Studio / Tools是否可以向我显示循环依赖关系图?

[英]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. 对大型解决方案非常有用。

在此输入图像描述

“右键单击项目” - >“项目依赖项”并检查是否在此处设置了依赖项,因为这可能是您遇到问题的原因(当然我假设您在“参考”中没有循环依赖)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM