No history yet

Configuring AI Extensions

Modifying Your Installation

Visual Studio 2022 often bundles AI tools with its main workloads, but a professional setup means knowing how to add or remove components precisely. You don't need to reinstall everything to get the tools you need. The Visual Studio Installer is designed for this kind of modification.

To begin, close Visual Studio and open the Visual Studio Installer application. Find your installed version of Visual Studio 2022 and click the 'Modify' button. This opens the configuration window where you can adjust workloads, individual components, and language packs.

Instead of browsing through workloads, navigate directly to the 'Individual components' tab. Use the search bar to find and select 'GitHub Copilot' and 'IntelliCode'. Once checked, click 'Modify' to begin the download and installation.

Lesson image

This approach ensures you have the correct extensions without adding unnecessary bulk from a full workload you might not need.

Activating and Managing a Duo

Once installed, GitHub Copilot and IntelliCode exist as separate extensions within Visual Studio, each with its own activation state and account requirements. Think of them as two distinct specialists that need to be managed differently.

GitHub Copilot requires you to sign in with a GitHub account that has an active Copilot subscription. After installation, you'll typically see a notification or an icon in the bottom status bar prompting you to sign in. Clicking it will open a browser window to authenticate with GitHub and grant Visual Studio access. You can confirm your status by looking for the Copilot icon.

The Copilot status badge, a small icon in the bottom panel of the editor, is your main control hub. Clicking it lets you quickly enable or disable code completions, check your connection status, or access settings without digging through menus.

IntelliCode, on the other hand, is tied to your main Visual Studio account, which is usually a Microsoft account. It often works immediately after installation, drawing on its general training data. However, its more advanced features, like team completions that learn from your codebase, depend on you being signed in.

Fine-Tuning Completions

It's helpful to understand how these tools complement each other. IntelliCode excels at context-aware, single-line suggestions based on patterns in your own code and popular open-source libraries. It stars its best recommendations at the top of the completion list, making it easy to pick the most likely option.

Copilot takes a broader approach. It generates multi-line blocks of code, entire functions, or even documentation based on your comments and the surrounding code context. It's less about suggesting the next variable name and more about anticipating the next several steps in your logic.

You can fine-tune IntelliCode's behaviour by navigating to Tools > Options > IntelliCode. Here, you can enable or disable preview features or control how it suggests code completions. This allows you to balance cutting-edge features with stability.

As such, learning to provide as much context as possible is key when interacting with GitHub Copilot, especially with the code completion feature.

Managing these extensions effectively involves more than just installation. It means keeping them active, signed in, and configured to support your workflow. If you notice performance issues, you can temporarily disable an extension via the Extensions > Manage Extensions menu. This puts it in an inactive state without requiring a full uninstall, letting you easily re-enable it later.

Quiz Questions 1/5

If you want to add an AI tool to Visual Studio 2022 without adding an entire workload, what is the recommended first step?

Quiz Questions 2/5

What is the key difference in how you activate GitHub Copilot versus IntelliCode?

With both tools configured, your environment is ready for a more efficient coding workflow.