简体   繁体   English

如何使用Resharper在解决方案中的其他项目中找到C#组装项目参考?

[英]How to find C# Assembly Project References in other Projects within Solution using Resharper?

I'm troubleshooting code in a C# .Net Data Access Class Library (ieAssembly) that my Team wrote. 我正在对团队编写的C#.Net数据访问类库(即Assembly)中的代码进行故障排除。 Let's call this project DAL.csproj . 我们将此项目DAL.csproj This project is inside a very large Visual Studio 2012 solution (50+ projects) consisting of several WCF services, a proxy service library that proxies calls between various WCF services, a Winforms application and a whole bunch of other C# Projects. 该项目位于一个非常大型的Visual Studio 2012解决方案(50多个项目)中,该解决方案由多个WCF服务,代理服务器(用于代理各种WCF服务之间的调用),Winforms应用程序和其他所有C#项目组成。

I need to find out in what other C# Projects the DAL.csproj project is referenced in (ie has been added as a Project reference), using Visual Studio or Resharper. 我需要使用Visual Studio或Resharper DAL.csproj项目在哪些其他C#项目中被引用(即已添加为项目引用)。 (I'm guessing this feature is not built in inside Visual Studio 2012, hence I am trying with Resharper). (我猜想此功能未内置在Visual Studio 2012中,因此我正在尝试使用Resharper)。

I tried right clicking the DAL.csproj project inside Visual Studio, and did not find any context menu to find Usages / References ie where all this DAL.csproj is referenced in. 我尝试在Visual Studio中右键单击DAL.csproj项目,但没有找到任何上下文菜单来找到“用法/引用”,即在其中引用了所有DAL.csproj

Just to be clear, I need to find out which other C# Projects inside my solution have added a Project reference to the DAL.csproj Project in the same solution. 为了清楚DAL.csproj ,我需要找出我的解决方案中还有哪些其他C#项目在同一解决方案中向DAL.csproj项目添加了项目引用。

Versions of software: Visual Studio 2012 SP4. 软件版本:Visual Studio 2012 SP4。 Resharper 8.1 收割者8.1

Right click on References folder and select Optimize References . 右键单击“ References文件夹,然后选择“ Optimize References You will see what code is dependent on it. 您将看到哪些代码依赖于它。

The NDepend tool can draw you a diagram of assembly dependencies, if that's an option for you. 如果可以的话, NDepend工具可以为您绘制程序集依赖关系图。 R# won't help you much in that specific scenario. 在特定的情况下,R#不会对您有太大帮助。

I think there is two ways in VS 2012 itself: 我认为VS 2012本身有两种方法:

1 - right-click your solution in the solution explorer and select 'Project Dependencies' 1-在解决方案资源管理器中右键单击您的解决方案,然后选择“项目依赖项”
2 - Select Architecture > Generate Dependency Graph from the file menu. 2-从文件菜单中选择架构>生成依赖关系图。 (This might be a premium / ultimate feature) (这可能是高级/最终功能)

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

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