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

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube