Visual Studio Extension



The Pieces for Visual Studio Extension is a powerful and versatile tool designed to integrate seamlessly with the Visual Studio IDE, enhancing productivity and enabling efficient code management.

It provides users with a streamlined solution for managing and interacting with saved code snippets through the Pieces Drive, while leveraging the AI-powered capabilities of the Pieces Copilot—all directly within their development environment.

  • Pieces Copilot: Engage in AI-driven conversations to enhance productivity by generating code, adding comments, troubleshooting, and more—all contextualized to your project by adding files and folders as context, with or without the powerful Long-Term Memory Engine (LTM).

  • Pieces Drive: Effortlessly save, locate, and share frequently used code snippets to your Pieces Drive—Making it easier to organize your work, quickly access important pieces of code, and collaborate effectively with others.

Getting Started
Getting Started

Follow these instructions to download and install the Pieces for Visual Studio IDE Extension.

Support & Troubleshooting
Support & Troubleshooting

Explore troubleshooting options, navigate to our support page, or directly book a call with our engineers.

This extension is designed to offer two main pillars of functionality for developers working in the Visual Studio IDE:

AI Assistance with Pieces Copilot

Through Pieces Copilot, developers can generate code solutions with context-based AI conversations, add code comments, troubleshoot, and fix bugs right inside Visual Studio.

Material Management with Pieces Drive

With Pieces Drive and PiecesOS built into Visual Studio, developers can save, edit, search, and share their code easily.

This feature allows developers to keep their favorite code in a personal, easy-to-access library. They can quickly review past work, find related authors and links with the extra details saved with each piece, and much more.

Using Pieces Copilot

Inside Visual Studio, the Pieces Copilot offers several powerful actions to enhance your coding workflow using generative AI.

To begin, you can initiate a conversation with the LLM of your choice by right-clicking and selecting the Ask Copilot About Selection or any of the available Copilot Chat options.

For added context, you can also add specific files, folders or even entire repositories to the conversation so that the LLM utilized by Pieces Copilot has a comprehensive understand of your project and the task at hand.

You can also access Pieces: Explain / Modify / Comment Selection with Copilot commands from the right-click menu to easily get a breakdown of the code’s logic, make changes such as adding error handling, or add comments to your code.

Using AI Quick Actions

The Pieces Copilot comes packaged with AI Quick Actions, which are similar to CodeLens actions that sit above functions nearest to your cursor.

These Quick Actions are nested under Pieces, which automatically sits above applicable functions.

Unfortunately, Visual Studio does not support CodeLens features for Python, so AI Quick Actions will not work in Python files.

Supported languages for CodeLens features (AI Quick Actions) include C/C++, C#, Basic, vbscript, TypeScript and JavaScript.

With the new Pieces > Comment tool, the Pieces Copilot can generate meaningful, insertable documentation that explains your code's purpose and function.

Additionally, the Pieces > Explain feature can quickly generate a breakdown of code logic while simultaneously initiating a Copilot Chat conversation in the side window, providing deeper insights and context.


Pieces > Comment

Pieces > Explain


Managing Your Code Snippets

Saving and managing code snippets with Pieces for Visual Studio extension is quick and effortless.

To save a snippet, simply right-click the selected code, hover over Pieces, and select Save Current Selection to Pieces or Save Active File to Pieces.

Snippets are automatically stored in your Pieces Drive, keeping them organized and accessible—you can search for them using the Search Pieces Drive function which can be found in the right-click menu.

Additionally, you can use the Share Current Selection option to easily share snippets with others directly from the extension.

Common snippet types include utility functions, API requests, and reusable code blocks.

When you save snippets to your repository, Pieces enriches them with AI-generated metadata, including tags, titles, authorship details, and descriptions, ensuring everything stays organized and accessible.

Below is a brief overview of the various material management options available within the Pieces for Visual Studio Extension:

Referencing & Reusing

The Pieces for Visual Studio Extension provides robust search tools to help you quickly find and access your saved snippets.

You can perform broad searches or narrow your results by using specific terms such as function names, keywords, or tags, making it effortless to locate the exact code you need.

Right-clicking anywhere in your active file, hovering over Pieces and selecting Search Pieces Drive will open up the search bar in the Pieces Drive view—from there, enter your query or use filters to find the saved material you’re looking for.

As you search, snippets matching your query will be displayed in a filtered list of your previously saved snippets.

From there, you can open the snippet and see it’s metadata in markdown or use the Pieces Drive window to edit the enriched metadata saved alongside it.


Download the Extension

Ready to streamline your development? Download the Pieces for Visual Studio Extension and follow our installation guide to start.

Updated on