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? 开发者_Python百科
(ReSharper based answers are also acceptable! :) )
Thanks!
You can do this through notepad++
quite easily by giving the solution directory and *.csproj
as the filter i.e. searching the csproj
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">
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'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):
gci -Recurse -Filter '*.csproj' |
where { $_ | sls '<Reference.*"System\.Data("|,)' } |
select -ExpandProperty Name
Replace System\.Data
with the full name of the assembly you're searching for.
精彩评论