Windows 10 Pro (1909) (18363.693)
C:\BuildTools>docker build -t buildtools2019:latest -m 2GB .
Sending build context to Docker daemon 5.632kB
Step 1/6 : FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
---> 99ad7e1e8763
Step 2/6 : SHELL ["cmd", "/S", "/C"]
---> Using cache
---> 0036eae025c7
Step 3/6 : ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
Downloading [==================================================>] 1.383MB/1.383MB
---> 6352dc16844c
Step 4/6 : RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache --installPath C:\BuildTools --all --remove Microsoft.VisualStudio.Component.Windows10SDK.10240 --remove Microsoft.VisualStudio.Component.Windows10SDK.10586 --remove Microsoft.VisualStudio.Component.Windows10SDK.14393 --remove Microsoft.VisualStudio.Component.Windows81SDK || IF "%ERRORLEVEL%"=="3010" EXIT 0
---> Running in 0bd348edf2d1
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1028\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\2052\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1055\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1046\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1042\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1029\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1036\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\3082\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1040\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1031\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1045\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1041\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1049\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\HelpFile\1033\help.html...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\vs_setup_bootstrapper.exe...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.Diagnostics.Tracing.EventSource.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.RemoteControl.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Common.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.Setup.Download.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.Telemetry.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Microsoft.VisualStudio.Utilities.Internal.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\Newtonsoft.Json.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\zh-Hans\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\tr\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\es\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15it\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\pl\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\pt-BR\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\de\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\fr\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\ko\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\ja\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\zh-Hant\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\cs\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\ru\vs_setup_bootstrapper.resources.dll...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\vs_setup_bootstrapper.config...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\vs_setup_bootstrapper.exe.config...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\detection.json...
Preparing: C:\Users\ContainerAdministrator\AppData\Local\Temp\53cbf54f79239554a085e227\vs_bootstrapper_d15\vs_setup_bootstrapper.json...
Removing intermediate container 0bd348edf2d1
---> 44cd6dae6ee9
Step 5/6 : ENTRYPOINT C:\BuildTools\Common7\Tools\VsDevCmd.bat &&
---> Running in d4f28146ac31
Removing intermediate container d4f28146ac31
---> 422948dd6806
Step 6/6 : CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
---> [Warning] Shell-form ENTRYPOINT and exec-form CMD may have unexpected results
---> Running in 09caca3da6f8
Removing intermediate container 09caca3da6f8
---> d65cf84bb565
Successfully built d65cf84bb565
Successfully tagged buildtools2019:latest
C:\Windows\system32>docker run -it buildtools2019:latest
docker: Error response from daemon: container 19ee4e5471057988298f7e032f4857843a0ab57fbf0a15a5e01dd8418be605fc encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF754179D2B: (caller: 00007FF75412E13A) Exception(2) tid(39c) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"\"cmd /S /C C:\BuildTools\Common7\Tools\VsDevCmd.bat \u0026\u0026\" powershell.exe -NoLogo -ExecutionPolicy Bypass","WorkingDirectory":"C:\","Environment":{"COMPLUS_NGenProtectedProcess_FeatureEnabled":"0","NUGET_VERSION":"4.4.3","ROSLYN_COMPILER_LOCATION":"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[30,120]}.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@GodofGurus, thank you for your feedback; we appreciate it. To make sure we have all the information needed to triage your issue, please provide more context around your general task.
Meanwhile, you may find answers here:
C:\BuildTools\ does not exist in the container, none of the work loads are added
@WilliamAntonRohm any further \specific details you need ?
@GodofGurus -- thank you for clarifying. Are you following a particular topic in docs.microsoft.com?
@GodofGurus -- thank you.
@ornellaalt -- please look into this issue.
@https://github.com/ornellaalt, @https://github.com/WilliamAntonRohm I too experience the same error when trying to install buildtools2019 inside a container.
Please update when you have a resolution for this issue.
I'm having the same issue installing buildtools2019 in a container, using Windows 10 (1803).
Thank you for your feedback, @GodofGurus, @parameswaranj, and @aquiln. This is a known issue that the product team is working on. I will update this thread, and the documentation when we have a resolution.
Same problem here, looking forward to the update of this thread.
Good morning @GodofGurus, @parameswaranj, @aquiln, and @stevenvanharen - we've updated the Build Tools documentation here. Please give the new instructions a try. We look forward to your feedback, and I'll be closing out this issue in the meantime.
@ornellaalt Hi tried the doc today and it didn't works on my machine: windows server version 1809 OS build 17763 following doc:
https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019
Dir "c:\BuildTools" is not found in container after build and no log info is found in $env:TEMP
Hi @ruicao93 ,
Which step of the doc are you having trouble with? Was it step 4 of the "Create and build docker file" ?
My I ask what is your docker version? (Run docker --version) Is your docker container internet connected? Does it have access to https://aka.ms/vs/16/release/vs_buildtools.exe ?
thanks
toby.
Hi @tobyhu87,
Thanks for your reply.
Which step of the doc are you having trouble with? Was it step 4 of the "Create and build docker file" ?
I have trouble with step 5 "Run the following command within that directory." After build the image and run container using the image, I found that "c:\BuildTools" didn't exists.
My I ask what is your docker version? (Run docker --version) Is your docker container internet connected? Does it have access to https://aka.ms/vs/16/release/vs_buildtools.exe ?
My docker container can access the internet and "vs_buildtools.exe" is downloaded successfull in $env:TEMP.
Window server 2019 version 1809 (OS build 17763.737)
PS C:\Users\Administrator> docker version
Client: Docker Engine - Enterprise
Version: 19.03.5
API version: 1.40
Go version: go1.12.12
Git commit: 2ee0c57608
Built: 11/13/2019 08:00:16
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Enterprise
Engine:
Version: 19.03.5
API version: 1.40 (minimum version 1.24)
Go version: go1.12.12
Git commit: 2ee0c57608
Built: 11/13/2019 07:58:51
OS/Arch: windows/amd64
Experimental: false
Hi @ruicao93 ,
It looks like either the Bootstrapper did not run or it failed.
Is it possible to share your 'RUN' command with me in your Dockerfile?
In your $env:TEMP, do you see a file dd_bootstrapper_
thanks, toby.
I have this problem as well. From what I saw, it did install, but it ignored the --installPath. Visual Studio is in \Program Files (x86).
To clarify:
The example Dockerfiles that I have found all seem to have a an ENTRYPOINT directive that assumes that the --installPath C:\BuildTools given in:
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--add Microsoft.VisualStudio.Workload.AzureBuildTools `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 `
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 `
--remove Microsoft.VisualStudio.Component.Windows81SDK `
--installPath C:\BuildTools || IF "%ERRORLEVEL%"=="3010" EXIT 0
will cause the installation to use C:\BuildTools as its destination. The actual destination that vc_buildtools.exe seems to silently decide to use is actually C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools, and in C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools I find VsDevCmd.bat, which seems to be the desired target for the ENTRYPOINT. This was learned after long and frustrating retries of building the container and finally inspecting it with PowerShell. This should be reopened, and perhaps renamed; it may not be only the container that cause vc_buildtools.exe to ignore --installPath C:\BuildTools. Also, yes, I do have:
# escape=`
at the beginning of the file, so the backslashes are valid, and not incorrectly used as escape sequence markers.
For those suffering with this, try the suggestion here: https://github.com/MicrosoftDocs/visualstudio-docs/issues/6102
You may have to play with quotations to encapsulate the buildtools.exe command in the wait command;
something like the following might work
start /wait 'C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache --installPath C:\BuildTools ...<flags_here>... || IF "%ERRORLEVEL%"=="3010" EXIT 0'
Most helpful comment
Thank you for your feedback, @GodofGurus, @parameswaranj, and @aquiln. This is a known issue that the product team is working on. I will update this thread, and the documentation when we have a resolution.