We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

covu • 4 years ago

Your example no longer works. The build tools are not installed into C:\BuildTools so the entrypoint is invalid. But they are installed into C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools. Changing the entrypoint to this folder does allow the container to be run interactively.

However, despite this, a VS2019 C++ hello world project still does not compile in the container using msbuild due to error MSB4019 C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.Cpp.Default.props is not found.

The VC folder doesnt even exist in the Microsoft folder, so it looks like those components are still not installed by vs_buildtools.exe

Ξli • 3 years ago

Running into the same issue. Does anyone have a solution to this? I feel like I have tried everything at this point.

I found others saying to add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 but that does not work for me either.

Adriano • 4 years ago

Do you have a solution so one can install specific minor releases instead of the latest one?

I need that for VS 2017 at the moment, but I'm unable to do it, even installing specific versions of vs_buildtools from chocolatey.

John Freeman • 4 years ago

A specific minor release of Visual Studio? I don't know how to do that, no. Sorry! :(

Krzysztof • 4 years ago

This article is a godsend, I've just spent 4h trying to figure out why running the VS BuildTools installed directly from within PowerShell doesn't work at all. It's disappointing to see that we still don't know why that happens but the `cmd /S /C` has just spared me ages of trying to debug this. Thank you so much!

Vishal Banwari • 5 years ago

Thankyou John. Your article was helpful :)

Steve Down • 6 years ago

When I attempt to increase the size of the base image using "storage-opts" above, I get the following error on build:

hcsshim::PrepareLayer - failed failed in Win32: The parameter is incorrect. (0x57)

When I name it "storage-opt" to match the dockerd.exe command-line parameter, I do not get this error, but it also does not increase the base image size. This appears to be true as of Windows 1909.

Alexander • 6 years ago

Thank you John! Your article helped me a lot!