Visual Studio AI-Assistance: A Developer’s Best Friend

Peter Groenewegen

The Visual Studio family leverages AI to help you stay focused on the creative tasks that get the core logic of your application built.  

For Visual Studio and VS Code, IntelliCode is free and assists with writing, editing and understanding code in popular languages. With IntelliCode, models run locally, meaning that none of your code leaves your machine. This blogpost will focus on IntelliCode.

For users desiring even more AI capabilities, Copilot and Copilot for Business are also supported by Visual Studio and VS Code. Copilot’s models are cloud based. 

Tips, tricks, and engineering story behind IntelliCode. 

Whether you’re a newer developer or experienced, consider this blogpost your jumping off point to get the most from IntelliCode. The team is excited to share tips, tricks and engineering stories that we’ll link to below – content to come soon!  

Writing code 

  • IntelliSense list: Instead of exploring an unsorted list of methods and members, IntelliCode uses AI to place what we believe is most relevant to your code context at the top and places a symbol next to item.
  • Gray text: To help increase productivity and reduce errors, IntelliCode can suggest up to a whole line of code in grey text. Your code context and code style are used to help generate these suggestions.

Editing code

  • Repeated edits: Making several similar but slightly different edits? IntelliCode can detect the pattern and apply the change to other locations – saving you keystrokes and navigation
  • Intent Detection: IntelliCode has learned to assist with common edit patterns such as creating a constructor after creating parameters, or even with editing code that’s just been pasted.

Navigating code

  • API Usage Example: Making a round trip to the browser and fiddling with search to figure out how to use an API is a common workflow. This feature can save you from that by presenting examples of how an API is commonly used.

Navigating Packages 

  • Most Common NuGet Packages: This feature helps you find and use the most used NuGet packages, streamlining the process of finding and adding packages to your projects.

Reviewing code

  • The Visual Studio family is excited to explore AI-assistance for workflows that start with preparing a pull request and end with a successful merge.  

The IntelliCode team is not only excited to help improve your productivity, but also to learn about your scenarios that could be improved with AI.