Skip to main content

Pieces for Developers Visual Studio Extension

Install the Visual Studio ExtensionInstall the Visual Studio Extension
info

Compatible with Visual Studio 2022 and versions 17.9.0 and higher

Using the Pieces for Developers Visual Studio Extension in combination with the Pieces Desktop App makes saving and reusing code simple within your IDE.

Installing the Pieces for Developers Visual Studio Extension​

info

In order to use the Pieces Visual Studio Extension, you must have Pieces OS. We also recommend downloading the Pieces for Developers Desktop App.

You can install the Visual Studio Extension through the Visual Studio Marketplace or by searching for Pieces in the plugins search of your IDE.

Once you've installed the extension, you'll have to restart Visual Studio before using Pieces.

Showing Pieces Tool Windows​

If the Pieces Tool Windows are not present in your IDE, you can enable them by going to View > Tool Windows and selecting the Pieces windows you need.

Pieces Copilot​

Utilize a powerful Copilot integrated into your IDE, bringing your development to the next level.

A familiar chat experience spread across all your favorite text editing softwares.

The Copilot chat window has the same familiar features integrated into multiple text editing softwares: VS Code, Jetbrains, Visual Studio, Web Extension, Obsidian, and JupyterLab.

Features​

Insert At Cursor​

The Insert At Cursor feature allows you to insert code snippets at the cursor location in your code editor. To use this feature, select the code snippet you want to insert and click the Insert At Cursor button.

You can generate a shareable link for a code snippet by selecting the code you want to share, Right-click > Pieces > Share. This will generate and copy a Pieces link to your clipboard, which you can share with your teammates, friends, or on social media!

CodeLens - Explain & Comment​

The CodeLens feature allows you to explain and comment on code snippets directly within the IDE. To disable Pieces CodeLens, navigate to the settings and turn off the CodeLens option.

Quick Action - Fix​

The Quick Action feature enables you to fix issues marked by red squiggles in your code.

Asset Explorer​

The Pieces Explorer feature allows you to browse, manage, and organize your code snippets and assets within the IDE.

Default Action​

The action taken when double-clicking on an asset item or when pressing enter with one highlighted and in focus.

Asset Explorer Filtering​

The asset explorer now supports filtering by tags or language, making it easier to find the specific assets you need.

Asset Preview​

Preview assets directly within the Pieces Explorer without opening them in the editor.

Copy to Clipboard​

Quickly copy code snippets or asset details to your clipboard for easy sharing and use.

Modifying or Deleting Assets​

Easily modify tags, links, content, or delete assets directly within the Pieces Explorer.

Settings​

This setting enables automatic copying for generated Pieces links. If enabled, you won't need to copy a Pieces link before sharing it with a teammate or friend.

Cloud Capabilities​

Here you can choose which type of ML models you'd like to use in Pieces for Visual Studio: Cloud, Local, or Blended. To learn more about the types of ML models and their privacy implications, visit this section of our documentation.

CodeLens​

To enable or disable Pieces CodeLens, go to Tools > Options > Pieces > User Preferences and check the Enabled option for CodeLens.

You can also enable or disable CodeLens options by navigating to Tools > Options > Text Editor > All Languages > CodeLens and unchecking the Show Pieces For Visual Studio checkbox.

Custom Pieces OS URL​

If you're using a custom Pieces OS URL, you can update it here. This is useful if you're using a self-hosted version of Pieces OS.

Default Action​

The Default Action setting allows you to choose what happens when you double-click on an asset item or press enter with one highlighted and in focus.

Copilot Theme​

Use the Copilot Theme selector to change the message background color in Copilot.

Share Feedback​

You can share bug reports or other feedback by selecting the Share Feedback link in this section.

Having Trouble with Pieces for Visual Studio?​

If the Visual Studio extension isn't working for you, please make sure you have the following:

  • The latest version of Pieces for Visual Studio
  • Pieces OS version 9.0.0 or higher
info

After installing or updating your software, please restart Visual Studio. If there is still a problem, reach out to our support.

Uninstalling the Pieces for Visual Studio Extension​

To uninstall Pieces for Visual Studio:

  1. Visit the Extensions tab on your sidebar
  2. Select the Settings icon next to the Pieces for Visual Studio Extension
  3. Select uninstall

In order for Pieces to be completely uninstalled from Visual Studio, you'll need to restart your IDE.

Support and Community​