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 at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events