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

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

Subscribe on YouTube