News

Visual Studio IntelliCode Preview Offers Instant API Code Examples

The first preview of Visual Studio 2022 17.6 boosts GitHub integration and also sees AI-assisted IntelliCode instantly offering up real-world API code examples -- no more context switching required.

Visual Studio 2022 17.6 Preview 1 shipped this week along with the GA release of VS 2022 v17.5. For that minor-version update, the company touted AI-powered intent-based suggestions. Now, AI is put to further use, addressing the frustration of context switching -- or having to leave the IDE to search for help.

"Now with Visual Studio 17.6 Preview, IntelliCode makes finding real-world code examples for common APIs easier than ever," said Mcrosoft's Peter Groenewegen in a Feb. 22 blog post. "With this feature, you'll have real examples at your fingertips. See how an API has been used in real-world projects. Saving you time and making your coding even more efficient."

API Code Examples in Animated Action
[Click on image for larger, animated GIF view.] API Code Examples in Animated Action (source: Microsoft).

This functionality was provided last year in the open-source-based Visual Studio Code editor via an extension, which has now been installed nearly 10 million times.

VS Code Tool
[Click on image for larger view.] VS Code Tool (source: Microsoft).

The examples -- opening up in a new tab upon clicking a hover-generated prompt link -- come from IntelliCode's database, specifically some 100,000 different APIs, as the AI engine was trained on open source repositories on GitHub.

And speaking of GitHub, v17.6 preview 1 also further integrates with that open source code repository/development platform, with similar in-IDE search-and-reference functionality.

"The GitHub Issues integration allows you to search and reference your issues from the commit message box in VS, in response to this suggestion ticket," says the preview 1 release notes. "You can reference an issue or a pull request by typing # or clicking on the # button in the lower right side of the commit message text box. If you weren't already authenticated to access related issues, you will now be prompted to sign in to take advantage of this feature."

This new feature is further explained in a Feb. 23 blog post from Microsoft's Jessie Houghton titled "Reference GitHub Issues and Pull Requests in Visual Studio."

"Speed up your workflow by linking your related work items directly in Visual Studio. You can use the related items to get more context from the Git Repository window," said Houghton, who goes on to explain how it works.

The preview 1 release notes also detail line unstaging, support for the .NET Multi-platform App UI (MAUI) workload on Arm64 Visual Studio, various C++ improvements and more.

About the Author

David Ramel is an editor and writer for Converge360.

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