Announcing General Availability for Code Search

Jimson Chalissery [MSFT]

Today, we are excited to announce the general availability of Code Search in Visual Studio Team Services. Code Search is available for Team Foundation Server “15” as well.

What’s more? Code Search can be added to any Team Services account for free. By installing this extension through the Visual Studio Marketplace, any user with access to source code can take advantage of Code Search.

With this release Code Search now understands Java. Not only can you perform full text matching, for C#, C, C++, VB.NET and Java it understands the structure of your code and allows you to search for specific context, like class definitions, comments, properties, etc across all your TFVC and Git Projects. We’ll be adding support for additional languages in the future.

Enabling Code Search for your VSTS account

Code Search is available as a free extension on Visual Studio Team Services Marketplace. Click the install button on the extension description page and follow instructions displayed, to enable the feature for your account.

Note that you need to be an account admin to install the feature. If you are not, then the install experience will allow you to request your account admin to install the feature.

Installation of the extension triggers indexing of the source code in your account. Depending on the size of the code base, you may have to wait for some time for the index to get built.

You can start searching for code using the search box on the top right corner or use the context menu from the code explorer.


Enabling Code Search on Team Foundation Server “15”

Code Search is available for Team Foundation Server starting with TFS “15”. You can configure Code Search as part of the TFS Server configuration. For more details see Administer Search.

Note that you need to be a TFS admin to configure Search as part of TFS.

Installation of the Code Search extension triggers indexing of the source code in a collection. Installation can be initiated for all collections by a TFS admin during configuration of the Search feature or post configuration by Project Collection admins for their respective Collections. The latter can be achieved by navigating to the Marketplace from within your TFS instance. Depending on the size of the code base, you may have to wait for some time for the index to get built.


Search across one or more projects

Code Search enables you to search across all projects (TFVC & Git), so you can focus on the results that matter most to you.


Semantic ranking

Ranking ensures you get what you are looking for in the first few results. Code Search uses code semantics as one of the many signals for ranking; this ensures that the matches are laid out in a relevant manner E.g. Files with a term appears as definition are ranked higher.


Rich filtering

Get that extra power from Code Search that lets you filter your results by file path, extension, repo, and project. You can also filter by code type, such as definition, comment, reference, and much more. And, by incorporating logical operators such as AND, OR, NOT, refine your query to get the results you want.


Code collaboration

Share Code Search results with team members using the query URL. Use annotations to figure out who last changed a line of code.


Rich integration with version control

The Code Search interface integrates with familiar controls in the Code Hub, giving you the ability to look up History, compare what’s changed since the last commit or changeset, and much more.


Refer to help documentation for more details.

Got feedback?

How can we make Code Search better for you? Here is how you can get in touch with us


Thanks, Search team


Discussion is closed.

Feedback usabilla icon