如何实际搜索Visual Studio中的所有文件 [英] How to actually search all files in Visual Studio

查看:143
本文介绍了如何实际搜索Visual Studio中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio Express 2013 for Web。说例如我在类Utils中有一个名为FooBar()的静态公共方法。我们还要说,我在很多.aspx文件中使用这种方法。比方说,我将FooBar()的方法签名更改为FooBar(字符串),随后我想查找Utils.FooBar的所有实例,以便我可以更新它们。

现在假设我进入Solution Explorer搜索框,选择在文件内容中搜索,然后输入Utils。尽管我在任何地方都调用Utils。*方法,但唯一显示的是Utils.cs文件。如果我继续输入Utils.FooBar,则什么都不显示。

现在,我正在启动一个cygwin窗口并使用grep,因为正常的Windows搜索也很无用。但似乎在那里必须有一种在Visual Studio中的所有文件中进行搜索的实际方法。我错过了什么?

解决方案

所以答案似乎是不使用解决方案资源管理器搜索框。



相反,打开解决方案中的任何文件,然后使用control-f search弹出窗口搜索所有文件:


  1. 从 - > Find Next /< - Find Previous选择器中选择Find All或通常只显示Current Document的选择器中的Entire Solution。


I am using Visual Studio Express 2013 for Web. Say for instance I have a static public method named FooBar() in class Utils. Let's also say that I use this method in a lot of .aspx files. Let's say I change the method signature of FooBar() to FooBar(string), and subsequently I'd like to find all the instances of Utils.FooBar so I can update them.

Now let's say I go to the Solution Explorer search box, select "Search within file contents", and type "Utils". Despite the fact that I make Utils.* method calls everywhere, the only thing that shows up is the Utils.cs file. If I keep typing "Utils.FooBar", nothing shows up.

Right now, I am launching a cygwin window and using grep since normal windows search is pretty useless too. But it seems like there there must be an actual way of searching within all files in Visual Studio. Am I missing something?

解决方案

So the answer seems to be to NOT use the Solution Explorer search box.

Rather, open any file in the solution, then use the control-f search pop-up to search all files by:

  1. selecting "Find All" from the "--> Find Next / <-- Find Previous" selector
  2. selecting "Current Project" or "Entire Solution" from the selector that normally says just "Current Document".

这篇关于如何实际搜索Visual Studio中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆