Visual Studio Code (VS Code) is one of the most popular code editors for developers, offering powerful features, extensions, and customization options. If you’re running Windows 10 or 11, you can use winget — the Windows Package Manager — to install Visual Studio Code quickly and efficiently.
In this guide, you’ll learn how to install Visual Studio Code with winget step-by-step.
What is Winget?
Winget is Microsoft’s official command-line package manager for Windows. It allows you to install, update, and manage software directly from the terminal, saving time compared to manual downloads.
Step 1: Check if Winget is Installed
Winget is included by default in Windows 11 and in the latest versions of Windows 10 (from version 1809 and above). To check if it’s installed:
- Press Windows + R to open the Run dialog.
- Type
cmd
orpowershell
and press Enter. - In the terminal, type: bashCopyEdit
winget --version
- If you see a version number, winget is ready to use. If not, install it via the Microsoft Store by updating the App Installer package.
Step 2: Search for Visual Studio Code in Winget
Before installing, it’s a good idea to confirm the exact package name. In the terminal, run:
bashCopyEditwinget search "Visual Studio Code"
This will show a list of results. Look for the package from Microsoft.VisualStudioCode.
Step 3: Install Visual Studio Code with Winget
Once you’ve confirmed the package name, install it by running:
bashCopyEditwinget install --id Microsoft.VisualStudioCode
Winget will automatically download the latest stable version of VS Code and install it without needing you to open a browser.
Step 4: Verify the Installation
After the process finishes, you can launch Visual Studio Code by typing:
bashCopyEditcode
Or search for Visual Studio Code in the Start menu.
Why Install VS Code Using Winget?
- Faster Setup – No need to open the browser, download, and manually run an installer.
- Always Up to Date – You can easily update VS Code using: bashCopyEdit
winget upgrade Microsoft.VisualStudioCode
- Scripting & Automation – Perfect for developers setting up new machines or automating their workflow.
Updating or Uninstalling VS Code via Winget
- Update VS Code: bashCopyEdit
winget upgrade Microsoft.VisualStudioCode
- Uninstall VS Code: bashCopyEdit
winget uninstall Microsoft.VisualStudioCode
Conclusion
Using winget to install Visual Studio Code is one of the fastest and most efficient methods available for Windows users. Whether you’re setting up a new development environment or just want to save time, this approach ensures you always have the latest version without unnecessary manual steps.
Now that you know how to install Visual Studio Code with winget, you can get started coding in just a few minutes.