News

Visual Studio 2013 Add-In Allows Code Searching Across Web

With Bing Code Search, Visual Studio developers get context-aware search capabilities from within IntelliSense.

Microsoft is doing its best to keep developers in Visual Studio at all times. For instance, a JSON debugger was added to Visual Studio 2103 Update 2, and Windows Embedded Compact 2013 integration with Visual Studio 2013 is coming this spring. Now, add Bing Code Search to that list.

Bing Code Search, a collaboration with numerous partners, including (of course) Bing, Microsoft Research, the Visual Studio team and StackOverflow, allows developers to search for code snippets within Visual Studio itself, instead of leaving the IDE and performing a typical browser-based search. The free add-in to Visual Studio simplifies the process of searching for reusable code across the Web, including sites like MSDN, StackOverflow, CSharp411 and Dotnetperls. Microsoft Research has even produced a video on how to use the add-in.

The add-in does more than just finding C# code snippets, though, as this TechNet blog post explains: "The add-in automatically adapts the snippets to match the developer's context, making the suggested snippets easier to understand and better prepared for reuse."

Bing Code Search can be launched directly from IntelliSense. It adds a new item at the top of the IntelliSense window, asking "How do I..." At that point, according to a Visual Studio team blog entry, it's a matter of typing in the task for which you're seeking code (the example in the blog is "read a file line by line"). After pressing Enter, Bing retrieves relevant code samples, using contextual information like project type and semantics to give the best results.

The results show up around the code, along with Microsoft's best guesses as to which samples are the highest quality and most likely to help.

Currently, the add-in is limited to C# samples and Visual Studio 2013, but Microsoft said it's looking for ways to broaden Bing Code Search's functionality for more languages (a number of comments on the download page pleaded for a Visual Basic version, for example. Additionally, reports are indicating that it's conflicting with the popular third-party product ReSharper).

Those limitations don't seem to be dampening enthusiasm for the product, though. The TechNet blog said that even though it's brand new, 40,000 searches per day were being made by developers worldwide. Initial studies have shown that it's about 60 percent faster, on average, than searching without the add-in.

About the Author

Keith Ward is the editor in chief of Virtualization & Cloud Review. Follow him on Twitter @VirtReviewKeith.

comments powered by Disqus

Featured

Subscribe on YouTube