IntelliCode Now Suggests NuGet Packages for You: 'Like Netflix Recommendations'
When coding in the new Visual Studio 2019 v16.10, IntelliCode will now scan your project to suggest handy NuGet packages for you, saving the time and hassle of finding just the right helpers on your own.
This new functionality comes three years after IntelliCode debuted with an AI-assisted take on IntelliSense. Both of those are context-aware code-completion tools, offering up likely code text strings you're likely to want as you type in list members, parameters and much more. In the 2018 Microsoft Build developer conference, IntelliCode arrived, using AI to go beyond ordinary statement completion suggestions, of which it places the ones you're most likely to use at the top. It uses machine learning in multiple ways, including scanning high-quality GitHub projects to train itself on best practices, in addition to teaching itself about your own code. It has steadily improved since then, with the first deep learning model, for Python coding in Visual Studio Code, announced last year.
Now, with the debut of VS 2019 v16.10 last week during Build 2021, IntelliCode can scan your installed NuGet packages and suggest other ones you might want to help with your workflow, depending on the type of project you're in. It's called NuGet IntelliCode Package Suggestions.
"IntelliCode Package Suggestions use a collaborative filtering algorithm to take the context of your project, including the installed packages and project framework, to then suggest packages that are frequently included in similar projects," Microsoft said in a blog post. "You can think of it like Netflix recommendations for NuGet packages. The model works best in projects with more packages because it has more context to tailor your suggestions. It will also continue to improve with each new release of Visual Studio -- adapting to the latest packages and trends."
The tool is even smart enough to ignore packages that are deprecated, instead offering non-deprecated alternatives.
As the graphic above, shows, the prioritized recommendations will appear in the NuGet Package Manager next to stars. If you've seen these before VS 2019 v16.10, it's because Microsoft had been conducting A/B testing and you were in the group with the new functionality. From now on, only v16.10 and later editions of the IDE will support it.
With Microsoft pointing AI to all sorts of developer tooling and other use cases, it also plans on furthering the NuGet functionality, exploring initiatives including package search relevance and project file editing.
David Ramel is an editor and writer for Converge360.