DEV Community

Vigneshwaran Vijayakumar for Winsides

Posted on • Originally published at winsides.com on

How to Install Install VSCode using WinGet on Windows 11?

Install VSCode using Winget Command : Very Similar to the Package Distributions in Linux, such as the APT package managers in Ubuntu-based Distributions , WinGet is the Windows Package Manager. Winget Command enables users to install, configure, update, and uninstall applications using Command Line Tools, such as the Command Prompt. We have made a detailed article explaining How Winget Command works on Windows 11 and the popular Winget Commands.

Install VSCode using Winget Command
Install VSCode using Winget Command

In this article, let’s explore how to install Microsoft VS Code using the Winget Command on Windows 11. Let’s Get Started.

Quick Steps to Install VSCode using WinGet Command on Windows 11

The following are the detailed steps to install Microsoft Visual Studio Code using Winget Command on Windows 11.

  • Open Command Prompt via the Start menu.

Search for VScode in the Winget Repository
Search for VS Code in the Winget Repository

  • Once the CMD opens, we will use Winget and search for VSCode in the Winget Source Repositories. The sources include MSStore and Microsoft Community Repository (MCR).
  • Execute the following command in the Command Prompt. winget search Microsoft.VisualStudioCode

Search for VSCode using Winget Command
Search for VSCode using the Winget Command

  • This Command will search for the Winget Repositories and list the available applications.
  • From the list, kindly note down the official application ID. Let’s install Microsoft Visual Studio Code using this ID in the next step.

Note down the official VSCode ID
Note down the official VSCode ID

  • Run the following command. winget install --id Microsoft.VisualStudioCode

Install VSCode using Winget Command on Windows 11
Install VSCode using Winget Command on Windows 11

  • This command will install VSCode using Winget on your Windows 11 Rig. The process will take some time to complete. Kindly be patient. Once you get the _ Successfully Installed _ message, Microsoft Visual Studio Code is ready to use.

VSCode Installed using Winget Command
VSCode installed using the Winget Command

Note : Alternatively, you can use the following simple command winget install vscode to install VSCode using Winget on Windows 11.

Other Ways to Download and Install Microsoft Visual Studio Code on Windows 11

Download VSCode from the official website
Download VSCode from the official website

While this article is about installing VSCode using Winget, other recommended methods to install this application on Windows 11 are as follows.

  1. Download Microsoft Visual Studio Code from the Official Website.
  2. You can use the Microsoft Store to install VS Code directly on your Windows 11.

Install VSCode from MSStore
Install VSCode from the MS Store

Information on the Go! On Windows 11, you can run Visual Studio Code in a Docker-based development environment instead of installing it locally. With Docker Desktop and the VS Code Remote Containers extension, VS Code acts as a client that connects to a container. This allows you to develop in an isolated Linux environment or match your production setup without installing all tools on your host machine.

Upgrade VSCode to the Latest Version using WinGet Command

In this section, let’s check out how to update Microsoft Visual Studio Code to its latest version using Winget.

  • In the Command Prompt, kindly execute the following command. winget upgrade --id Microsoft.VisualStudioCode

Winget Command to upgrade VSCode to its latest version
Winget Command to upgrade VSCode to its latest version

  • The system will verify and upgrade Visual Studio Code to its latest version.

Note : To upgrade all the installed applications using Winget, you can use the following command winget upgrade -all

Uninstall VSCode using Winget Command on Windows 11

To uninstall Microsoft Visual Studio Code using Winget, kindly use the following command.

  • In the Command Prompt, execute the following command to uninstall VSCode winget uninstall --id Microsoft.VisualStudioCode

Uninstall VSCode using Winget on Windows 11
Uninstall VSCode using Winget on Windows 11

Frequently Asked Questions [FAQ]

Can I Specify the Installation Scope for VSCode (User or System-Wide)?

Yes. By default, Winget installs the user installer. To install VSCode with System-wide scope, kindly execute the command in the Command Line Tools with Elevated Privileges. winget install --id Microsoft.VisualStudioCode --scope machine

How to skip upgrading VS Code during Bulk Upgrade?

You can exclude upgrading Microsoft Visual Code while doing a bulk upgrade by running the following command. winget upgrade --all --exclude Microsoft.VisualStudioCode

How to Silently Automate the VS Code Installation for enterprise environments?

To prevent GUI prompts and accept agreements automatically, you can run the following command. This will install VS Code in the background silently. winget install --id Microsoft.VisualStudioCode --silent --accept-package-agreements --accept-source-agreements

Take Away

While there are different ways available to download and install Microsoft Visual Studio Code on Windows 11, installing VSCode using Winget provides Centralized Management. Other advantages of using Winget include avoiding web clutter , safe repository downloads , and quick installations.

Have Queries?

We hope you are satisfied with our article on How to Install VSCode using Winget Command on Windows 11, and if you have any queries , kindly let us know in the comments. For more interesting articles, stay tuned to Winsides.com. Happy Coding! Peace out!

Top comments (0)