Visual Studio Build Tools 2022 allows you to build native and managed MSBuild-based applications without requiring the Visual Studio IDE. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of Visual Studio Build Tools 2022 from the command line using the EXE installer.
How to Install Visual Studio Build Tools 2022 Silently
Visual Studio Build Tools 2022 Silent Install (EXE)
- Navigate to: https://aka.ms/vs/17/release/vs_BuildTools.exe
- Download the vs_BuildTools.exe to a folder created at (C:\Downloads)
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads folder
- Enter the following command to extract the setup files:
vs_BuildTools.exe --layout .\vs_BuildTools
- Press Enter
- Navigate to the C:\Downloads\vs_BuildTools folder
- Enter the following command:
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --allWorkloads --includeRecommended --includeOptional --quiet --norestart
- Press Enter
After several minutes you will find Visual Studio entries in the Start Menu, Installation Directory, and Programs and Features in the Control Panel.
Software Title: | Visual Studio Build Tools 2022 |
Vendor: | Microsoft Corporation |
Architecture: | x86_x64 |
Installer Type: | EXE |
Silent Install Switch: | vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --allWorkloads --includeRecommended --includeOptional --quiet --norestart |
Silent Uninstall Switch: | vs_setup.exe uninstall --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" --quiet --norestart |
Download Link: | https://aka.ms/vs/17/release/vs_BuildTools.exe |
PowerShell Script: | https://silentinstallhq.com/visual-studio-build-tools-2022-install-and-uninstall-powershell/ |
The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.
Additional Configurations
Change Default Installation Directory
You can change the default installation directory by using the following command line parameters. In this example, I’m installing Visual Studio Build Tools 2022 to “C:\vs_BuildTools2022”
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --installPath C:\vs_BuildTools2022 --allWorkloads --includeRecommended --includeOptional --quiet --norestart |
Visual Studio Build Tools 2022 Silent Install Using Response File
- Follow Steps 1-6 under “How to Install Visual Studio Build Tools 2022 Silently”
- Open Notepad or your favorite text editor
- Add the following lines:
{
"installChannelUri": ".\\ChannelManifest.json",
"channelUri": "https://aka.ms/vs/17/release/channel",
"installCatalogUri": ".\\Catalog.json",
"channelId": "VisualStudio.17.Release",
"productId": "Microsoft.VisualStudio.Product.BuildTools",
"includeRecommended": true,
"includeOptional": true,
"quiet": true,
"norestart": true,
"addProductLang": [
"en-US"
],
"add": [
"Microsoft.VisualStudio.Workload.AzureBuildTools",
"Microsoft.VisualStudio.Workload.DataBuildTools",
"Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Workload.NodeBuildTools",
"Microsoft.VisualStudio.Workload.OfficeBuildTools",
"Microsoft.VisualStudio.Workload.UniversalBuildTools",
"Microsoft.VisualStudio.Workload.VCTools",
"Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools",
"Microsoft.VisualStudio.Workload.WebBuildTools",
"Microsoft.VisualStudio.Workload.XamarinBuildTools"
]
}
- Save the file to C:\Downloads\vs_BuildTools and name it: CustomInstall.json
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Navigate to the C:\Downloads\vs_BuildTools folder
- Enter the following command:
vs_setup.exe --quiet --nocache --wait --in C:\Downloads\vs_BuildTools\CustomInstall.json |
Azure Development Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.AzureBuildTools
Description: MSBuild tasks and targets for building Azure applications
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.AzureBuildTools;includeRecommended;includeOptional --quiet --norestart |
Data Storage and Processing Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.DataBuildTools
Description: Build SQL Server Database Projects
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.DataBuildTools;includeRecommended;includeOptional --quiet --norestart |
.NET Desktop Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools
Description: Tools for building WPF, Windows Forms, and console applications using C#, Visual Basic, and F#
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools;includeRecommended;includeOptional --quiet --norestart |
MSBuild Tools Silent Install
ID: Microsoft.VisualStudio.Workload.MSBuildTools
Description: Provides the tools required to build MSBuild-based applications
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.MSBuildTools;includeRecommended;includeOptional --quiet --norestart |
Node.js Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.NodeBuildTools
Description: MSBuild tasks and targets for building scalable network applications using Node.js, an asynchronous event-driven JavaScript runtime
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.NodeBuildTools;includeRecommended;includeOptional --quiet --norestart |
Office/SharePoint Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.OfficeBuildTools
Description: Build Office and SharePoint add-ins, and VSTO add-ins
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.OfficeBuildTools;includeRecommended;includeOptional --quiet --norestart |
Universal Windows Platform Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.UniversalBuildTools
Description: Provides the tools required to build Universal Windows Platform applications
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.UniversalBuildTools;includeRecommended;includeOptional --quiet --norestart |
Desktop Development with C++ Silent Install
ID: Microsoft.VisualStudio.Workload.VCTools
Description: Build modern C++ apps for Windows using tools of your choice, including MSVC, Clang, CMake, or MSBuild
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended;includeOptional --quiet --norestart |
Visual Studio Extension Development Silent Install
ID: Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools
Description: Tools for building add-ons and extensions for Visual Studio, including new commands, code analyzers and tool windows
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.VisualStudioExtensionBuildTools;includeRecommended;includeOptional --quiet --norestart |
Web Development Build Tools Silent Install
ID: Microsoft.VisualStudio.Workload.WebBuildTools
Description: MSBuild tasks and targets for building web applications
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.WebBuildTools;includeRecommended;includeOptional --quiet --norestart |
Mobile Development with .NET Silent Install
ID: Microsoft.VisualStudio.Workload.XamarinBuildTools
Description: Tools for building cross-platform applications for iOS, Android and Windows using C# and F#
vs_setup.exe --nocache --wait --noUpdateInstaller --noWeb --add Microsoft.VisualStudio.Workload.XamarinBuildTools;includeRecommended;includeOptional --quiet --norestart |
How to Uninstall Visual Studio Build Tools 2022 Silently
Check out the Visual Studio Build Tools 2022 Install and Uninstall (PowerShell) post for a scripted solution.
- Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
- Enter the following command:
Visual Studio Build Tools 2022 Silent Uninstall (EXE)
vs_setup.exe uninstall --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" --quiet --norestart |
Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.