我可以按解决方案的参考名称进行搜索,以查看在哪些项目中引用了它吗?
是否有可能搜索整个解决方案以查看特定参考的用法?
比方说,我可以看到在哪些项目中引用了“Xyxyxyxy.dll”吗?
(基于 ReSharper 的答案也是可以接受的!:))
谢谢!
Is there any possibiliy to searh the whole solution to see a particular refrence's usage?
Let's say, can I see in what projects the reference "Xyxyxyxy.dll" is referenced?
(ReSharper based answers are also acceptable! :) )
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过
notepad++
轻松完成此操作,只需提供解决方案目录和*.csproj
作为过滤器,即在csproj
文件中搜索引用。如果您想搜索 GAC 程序集引用,请搜索以下字符串
其中System.Data
是程序集名称如果您想要要搜索非 GAC 引用的程序集,然后搜索以下内容字符串
<参考 Include="WindowsFormsApplication2,Version=1.0.0.0,Culture=neutral,processorArchitecture=MSIL">
You can do this through
notepad++
quite easily by giving the solution directory and*.csproj
as the filter i.e. searching thecsproj
files for the references.In case you want to search for GAC assembly references, search for the following string
<Reference Include="System.Data" />
whereSystem.Data
is the assembly nameIn case you want to search for a non GAC referenced assembly then search for the following string
<Reference Include="WindowsFormsApplication2, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
您可以使用 ReSharper 的项目层次结构功能来查看后退和前进参考链接。右键单击您的参考或项目,选择项目层次结构。
You can use Project Hierarchy feature of ReSharper to see back and forward reference links. Right click your reference or project, choose Project Hierarchy.
Devendra 的答案已经展示了如何通过简单的文本搜索来获得问题的答案。我认为可能值得表明您可以仅使用 PowerShell 执行相同的操作(如果您没有安装 Visual Studio 以外的编辑器):
将
System\.Data
替换为全名您正在搜索的程序集的名称。Devendra's answer already shows how you can get an answer to the question by doing a simple text search. I thought it might be worth showing that you can do the same thing using only PowerShell (in case you don't have an editor other than Visual Studio installed):
Replace
System\.Data
with the full name of the assembly you're searching for.