Configuring Windows Search for .NET developers

In Windows 7 and Windows Server 2008 Windows Search can be a powerful feature for developers. It enables you to search with a full-text index over your whole code repository. Once configured correctly, it can help a lot when searching things in code.

How can you use Windows Search?

Windows Search fits very well in Windows Explorer. If you use the search there Windows Search will be requested for results. As result you will not only get file names, although you can search for content in the file for registered and indexed file extensions.

Why Visual Studio’s Find in Files is not enough?

Visual Studio provides a very comfortable and powerful “Find in Files” feature. If you just have a few code files to search that will be enough for you. On the other hand searching gigs of code is too much time consuming. Windows Search is able to deliver search results with content search in just a second!

Configuring Windows Search

  1. Start / Control Panel / Indexing Options
  2. Choose the locations you want to index. Add you code library folders here
  3. Click to Advanced / File Types
  4. Configure all extensions you want and enable content search

A List of File Extensions

Here is a list of extensions you should consider.

asax, .ascx, .ashx, .asmx, .aspx, .bat, .c, .cd, .cmd, .config, .cpp, .cs, .cshtml, .csproj, .css, .csv, .datasource, .deploy, .disco, .htm, .html, .manifest, .rdlc, .resx, .settings, .sln, .svc, .svcmap, .testrunconfig, .tt, .ttinclude, .vb, .vbhtml, .vbproj, .vdproj, .vsto, .wsdl, .xaml, .xbap, .xhtml, .xss

Search Expressions Examples

Here are some examples search expressions that can be useful developers.

  • test.cs AND *.csproj
    Shows all project files that contain the file test.cs
  • mysample.csproj AND *.sln
    Shows all solutions that contain the project mysample.csproj
  • Save As
    Shows all files (for example .resx) that contain the text “Save As”.
Advertisements

One thought on “Configuring Windows Search for .NET developers

  1. Nice post. I was checking continuously this blog and I am impressed!
    Very useful info specially the last part 🙂 I care for
    such info much. I was seeking this particular info for a very long
    time. Thank you and good luck.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: