332

In Eclipse you can search for a file in the project by pressing CTRL-SHIFT-R.

Is there a way to do this in Visual Studio?

3
  • 5
    possible duplicate of Is there a way to quickly find files in Visual Studio 2010?
    – Jason
    Commented Jul 5, 2011 at 17:46
  • ps, i know this question was asked earlier, but the better, more correct answer is in the linked file.
    – Jason
    Commented Jul 5, 2011 at 17:47
  • 1
    No offense, but this feels horrible after CTRL+p of sublime text.
    – dud3
    Commented May 30, 2017 at 17:11

23 Answers 23

687

Just for anyone else landing on this page from Google or elsewhere, this answer is probably the best answer out of all of them.

To summarize, simply hit:

CTRL + ,

And then start typing the file name.

20
  • 9
    I probably waste 30 minutes every day just looking for the correct file in the Solution Explorer. This is my new favorite shortcut!
    – Rick Love
    Commented Dec 15, 2015 at 20:21
  • 14
    This shows method names as well though, bit annoying.
    – marsh
    Commented Jul 11, 2016 at 15:08
  • 4
    Unfortunately that doesn't limit the search to filenames, it also includes symbols Commented Oct 17, 2016 at 15:57
  • 16
    Not sure if this accurately answers the question, this thing searches for symbols as wells (methods etc) which is very annoying in a large project. Furthermore, the same thing could be achieved by Ctrl+; which is shortcut for search in solution explorer.
    – nawfal
    Commented Nov 18, 2016 at 14:33
  • 14
    @marsh In VS 2017.3 (and possibly earlier) Ctrl-, behaves like a command window somewhat. If you give it the 'f' command and provide a file name, it will search only files: e.g. "f someFile.cpp". There's also a button that prepends the "f" if you prefer clicking.
    – Kaganar
    Commented Aug 16, 2017 at 1:51
75

In VS2013 you can click in the solution explorer for this functionality.

The shortcut is:

ctrl + ;

To search only the names of files, and not the contents (especially in C#), uncheck these options:

1
  • Great and useful. I am using VS 2019 preview and it works perfectly fine for me. Commented May 8, 2020 at 7:12
61

The best option now is to install Microsoft Visual Studio add on called Productivity Power Tools (VS 2010 version, VS 2013 version).

With this comes "Solution Navigator" (alternative to Solution Explorer, with a lot of benefits).

search solution navigator

BTW, this feature is built-in into Visual Studio 2012.

1
  • 1
    Built in to 2017!
    – Phillip
    Commented May 15, 2018 at 15:17
51

With Visual Studio 2017, It now comes with a much better version, named “Go To All” and is bound to the keyboard shortcut CTRL + T as well as CTRL +, and includes inline filtering and “fuzzy search”

CTRL + T

CTRL + ,

5
  • 2
    YES, finally they added a built-in way to filter only by filenames! Type f, space, then the filename. Example: CTRL+T then f MyClass, then ↓ on your keyboard until you get to the matching file. This method is superior to the solution explorer search (which wastes space by showing both filenames and class names) in that it is strictly filenames only.
    – Nate Cook
    Commented May 25, 2018 at 17:10
  • 2
    You can even add a custom keyboard shortcut in Tools -> Options -> Keyboard -> Edit.GoToFile which adds the f for you.
    – Nate Cook
    Commented May 25, 2018 at 17:24
  • 3
    The default for Edit.GoToFile is Ctrl+1, Ctrl+F. There are more with Ctrl+1, Ctrl+<key>. F=Files, M=Members, R=Recent Files, T=Types
    – bugybunny
    Commented Nov 1, 2018 at 12:30
  • Link in answer is dead - domain is for sale.
    – Pang
    Commented Nov 11, 2020 at 0:58
  • Thanks for naming the action, something everybody else forgets about. Some people want to learn how to remap it. Commented May 22, 2023 at 15:17
31

Easily hit CTRL+SHIFT+T . This will look in the files' names.

0
15

In the search dropdown on the standard toolbar, you can use the "open file" macro, >of, to find files. Click in said dropdown (or hit Ctrl-D) then start typing (minus the quotes) ">of CoreEdit.cs", and you'll get a dynamic list that narrows as you type.

0
9

In Visual Studio 2017 you can search directly for files with Ctrl+1, Ctrl+F (Keyboard command: Edit.GoToFile).

Alternatively, you can use Ctrl+t or Ctrl+, (the Edit.GoToAll command) and start your search with f.

7

I believe what you are searching for is this Ctrl+T. With this you can search for symbols inside files and also can search files if you remove the hash(#) symbol.

See the screenshot if having doubts. Search Shortcut on Windows for VS Code

1
  • 4
    This answer is regarding Visual Code, not Visual Studio.
    – Dom
    Commented Jan 12, 2023 at 9:24
6

Since you mention ReSharper in a comment:

You can do this in ReSharper by using the "Goto File..." option (Ctrl-Shift-N or ReSharper -> Go To -> File...) in my key mappings.

1
  • 1
    @Andomar: Yes, it depends on whether you have the Visual Studio or IDEA shortcuts configured. Commented Aug 8, 2011 at 16:21
4

I use usysware DPack: http://www.usysware.com/dpack/

Then I just press ALT-U start typing the filename and choose the correct file. DPack also has other nice features.

enter image description here

(highlights added for screenshot)

Note: Will not work in Express editons of Visual Studio, since they don't allow plugins.

3
  • interesting, does it conflict with resharper do you know? Commented Oct 2, 2009 at 11:53
  • 4
    Works for me, but resharper got file search ctrl-shift-t
    – Erwin
    Commented Oct 2, 2009 at 12:02
  • i already use DPack (Delphi Pack) for their brief bookmarks. i didn't realize they also had unit search. Sad that Delphi's 10 year old IDE is more developer friendly than Visual Studio. People don't realize what they're missing; how sloppy VS is.
    – Ian Boyd
    Commented Nov 7, 2011 at 18:59
3

Visual Assist: link.

Install, load solution, press Shift+Alt+O, search for files in solution by substring. Try also Shift+Alt+S, for the equivalent for symbols. This addin has a bunch of completion popup and syntax colouring stuff in it that aren't to all tastes, but the code browsing features are done well and seem uncontroversial.

Judging by comments on the forums, compatibility with Resharper is something they pay attention to.

For free, try also Nifty Solution: link.

I haven't used this myself, but I use the author's Nifty Perforce plugin, and that is pretty tidy.

1
  • nifty solution is excellent. Its simple and it works. It also adds "toggle between header/source" which I like.
    – javs
    Commented Jun 20, 2011 at 15:03
3

Visual Studio for Mac 2017 7.x.x

To search by File name:

  • + .
  • Ctrl + Shift + D

To search by Type name:

  • Ctrl + Shift + T

Your keyboard focus might have been gone to following Right side Top corner of the Visual Studio Window:

enter image description here

3

I'd recommend PhatStudio if you're using upto VS 2012. Works pretty fast, and supports multi-word search by using "space". So to search for LoginController, you could press Alt+O and search using "Lo Con".

enter image description here

You could also use ReSharper (paid) and CodeMaid (free) to do this.

2

Open command window( View -> Other windows -> command window - Ctrl + W, A) type >of followed by the file name. It would start showing up the list as you type.

2

You can easily call for a window called "Navigate To" with combination ctrl + ,

Or, go to Tools and then click Navigate To

1
  • On visual studio 2012 it is ->EDIT ->Navigate To or ctrl+,
    – JayS
    Commented Jan 10, 2019 at 15:43
2

You can press ctrl+t to get a editor Get to all , in which you can type the file name to navigate to that specific file.

0
2

CTRL + P this searches for the file name your direct answer.

1
  • 8
    Not true for Visual Studio, only vs code. This actually opens the print dialog.
    – Malako
    Commented Dec 27, 2020 at 0:36
1

With Visual Studio 2017 Community edition on mac, the shortcut is:

  • Cmd+Shift+D: Find by file name
  • Cmd+Shift+T: Find by type name

To see these commands, navigate to the top menu: Search > Go To

1

In VS 2022 -- Couple of ways

  1. As per screenshot 1 <Ctrl + Shift + T> , But that doesnt work with that key combination, although it works with mouse click. Screenshot 1

  2. As per screenshot 2 go to menu Edit -> Go To - > Go To File <Alt + E + G + F>

Screenshot 2

1

I don't know Eclipse, however in Visual Studio 2022 you can use CTRL + T

0

Is too simple by using the Windows Explorer search inside the project folder. Done.

4
  • Add an index and that's a killer solution! Commented Dec 20, 2012 at 23:53
  • This option wouldn't work for ftp sites loaded in visual studio. In vs2013 Ctrl + semi colon allows you to search the solution explorer quickly by filename without leaving the window.
    – John
    Commented May 9, 2014 at 4:20
  • I am using VS 2010 and I wanted to open all the code behind files of my User Controls (i.e .ascx.cs files). Really your solution is straight forward and useful
    – sohaiby
    Commented Jul 25, 2015 at 8:33
  • 2
    b/c I love bouncing between Windows Explorer and Vs.NEt , yeah right.
    – RyBolt
    Commented Nov 1, 2016 at 13:11
0

In Visual Studio 2008 (and probably later), the free DevExpress CodeRush Xpress add-in supplies Ctrl+Alt+F, Quick File Navigation, which searches on an exact substring in the file name or on capital letters.

(Unrelated to this answer, but note the rather more useful, Quick Navigation, Ctrl+Shift+Q, which I would have liked to have known about before now :-) )

0

Visual Studio 2019:

Menu -> Preferences -> Key Bindings -> Navigate To...

Not the answer you're looking for? Browse other questions tagged or ask your own question.