Does VS.BuildTools suffice?

I was a little surprised to see our install instructions tell us to install Microsoft.VisualStudio.2022.Community. That was a fairly large download with the IDE included. I was wondering if the BuildTools package would work instead. I've tried it and my little test seemed to work. And it was only a 1GB download.

Has anyone else tried that? Would I run into limitations if I kept going?

1 Like

I think Windows SDK + Build Tools should suffice. I didn't try this alternative installation route though.

Yeah, I basically did a s/Community/BuildTools/ to the current instructions which also give you the Windows SDK and the VC++ tools that Swift's clang needs access to.

Windows SDK is available as a separate installer, but how did you install Build Tools without installing IDE if you used Visual Studio installer? I use Visual Studio installer in batch mode giving it instructions to install only two components:

Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.Windows11SDK.22621

and it installs IDE and whatever it wants.

Microsoft C++ Build Tools - Visual Studio ?
There is a link https://aka.ms/vs/17/release/vs_BuildTools.exe

I just did

winget install --id Microsoft.VisualStudio.2022.BuildTools --exact --force --custom "--add Microsoft.VisualStudio.Component.Windows11SDK.22000 --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"

Now I wonder if the Swift.Toolchain could have a dependency that does that so we just have to install one thing. I assume no or it would have been done?

IANAL, but the Build Tools have a licensing requirement that requires that you have a VS license (aka you have the VS license by installing it). However, yes, technically, the Build Tools provides everything that is needed (VC libraries and headers).

This is an interesting answer, though IANAL either :slight_smile:

If you can use the Visual Studio Community for free, you can also use the Build Tools with a valid free license.

Mind you that makes me wonder if I have that...