I am trying to install visual studio buildtools using winget through the following command
winget install -e --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended"
But it always installs in the C:\Program Files (x86)\Microsoft Visual Studio
directory.
I am trying to install the 64 bit version and I am not sure what arguments I have to pass.
Visual Studio 2022 itself is a 64-bit application. "C:\Program Files (x86)\Microsoft Visual Studio" is the default installation location for Microsoft.VisualStudio.2022.BuildTools.If you want to change the location of this installation, you can use --installPath
to customize the installation.
winget install -e --id Microsoft.VisualStudio.2022.BuildTools --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools --installPath your location"
Docs Referred: