Why does the Visual Studio Build Tools installer return immediately without installing anything?

I’m trying to follow the example for installing Visual Studio Build Tools in a container. I’m trying to figure out why the installation isn’t working like I expect. I cannot even start the container that is “built” with the components I think I want; it fails to run, saying The system cannot find the path specified.. I want to start the base image and run the installer myself, so I can see what is going on. Here is what I start with:

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:TEMPvs_buildtools.exe

Then I try manually running the command in the example:

C:TEMPvs_buildtools.exe --quiet --wait --norestart --nocache --installPath C:BuildTools --add Microsoft.VisualStudio.Workload.VCTools

This command returns immediately without doing anything. What is going on?

Source: StackOverflow