Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9673

Visual Studio 2022 build tools

$
0
0

I need to silently install Visual Studio 2022 C++ build tools using a script. The script should download an offline installer and install it on a machine. Visual studio 2022 does not provide offline installer, but it can be created using Create an offline installation document. Following this document for C++ development it suggests to create a local layout with Microsoft.VisualStudio.Workload.NativeDesktop workload. The resulting offline installer is about 3GB which is fine. From the script the offline installer is called with C:\CppBuildTools\vs_setup.exe --quiet --nocache --wait --in C:\CppBuildTools\CustomInstall.json command and the bellow is the content of CustomInstall.json file.

{"installChannelUri": ".\\ChannelManifest.json","channelUri": "https://aka.ms/vs/17/release/channel","installCatalogUri": ".\\Catalog.json","channelId": "VisualStudio.17.Release","productId": "Microsoft.VisualStudio.Product.Community","includeRecommended": true,"quiet": true,"norestart": true,"addProductLang": ["en-US"    ],"add": ["Microsoft.VisualStudio.Workload.NativeDesktop","Microsoft.VisualStudio.Component.VC.ATLMFC"    ]}

This approach requires almost 40GB storage and installs Visual Studio 2022 IDE and a lot of component which are not required. The script is supposed to install all the required component to build a C++ project on a build machine. So I'm wondering how to create the Visual Studio 2022 offline installer and how to install C++ build tools silently without including the IDE and other non essential components?


Viewing all articles
Browse latest Browse all 9673

Trending Articles