Installing Visual Studio Build Tools in a container is one of the worst experiences for a real value prop to containerization
Describe the bug There are no pre-built WCOW images with Visual Studio build tooling from Microsoft.
To Reproduce Trying to author your own... I am constantly battling issues with how slow and buggy installing and using Visual Studio inside a container is.
Expected behavior Just give me a WCOW image that I can do
COPY --from=mcr.microsoft.com/visualstudio:17 "C:/Program Files/Visual Studio/" "C:/Program Files/Visual Studio/"
as my installation step. It's 2025, it should be possible to put a bunch of files on a disk in the right places from archives when interacting with the Microsoft ecosystem. Or make winget work. Or anything really. Somehow, the product experience on Linux, which doesn't have product designers, is better!
Configuration:
- Edition: Server 2022
Additional context
It would be nice if you guys contributed to buildkit because the reliance on whatever the classic Docker builder is doing is crazy. Surely you must be using something else to build container images.
Thank you for creating an Issue. Please note that GitHub is not an official channel for Microsoft support requests. To create an official support request, please open a ticket here. Microsoft and the GitHub Community strive to provide a best effort in answering questions and supporting Issues on GitHub.
Thanks for bringing up this Issue. It looks like you have two asks: (1) using BuildKit for a faster build and (2) an official image with full Visual Studio build tooling.
For the first ask, good news is coming soon and I'll let @iankingori & @profnandaa share more about that.
For the second ask, we do publish a "Build Tools for Visual Studio" image: mcr.microsoft.com/dotnet/framework/sdk. If this isn't easy to use or providing what you need, could you please share a list of the features/components you want to have?
- I will say that I am confused that the Image name of the Visual Studio Build Tools related Docker Image is actually the .Net Framework related
mcr.microsoft.com/dotnet/framework/sdk. - I came from https://github.com/graalvm/container/issues/106 and https://github.com/oracle/graal/issues/10924 . In the GraalVM community, people use the
amitie10g/visualstudio2022buildtoolsDocker Image on Docker Hub for testing. Because building GraalVM Native Image requiresDesktop Development with C++of Visual Studio 2022. -
@ntrappe-msft thanks for looking into this, your diligence on these GitHub issues is really appreciated. Especially since they're all real :)
Let's take a look at the image mcr.microsoft.com/dotnet/framework/sdk
$ docker run --rm -it mcr.microsoft.com/dotnet/framework/sdk
Microsoft Windows [Version 10.0.20348.3692]
(c) Microsoft Corporation. All rights reserved.
C:\>msbuild
MSBuild version 17.14.8+a7a4d5af0 for .NET Framework
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
C:\>vsdevcmd
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.14.0
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
C:\>cl
'cl' is not recognized as an internal or external command,
operable program or batch file.
C:\>vswhere
'vswhere' is not recognized as an internal or external command,
operable program or batch file.
Observe cl is not on the PATH. This image does not have the Desktop Development with C++ package installed. This is the one people care about. So we're sort of back at square one. Presumably people would want all the packages installed, especially Visual Studio's clang.
What are the use cases?
- running C++ based CI / CD workloads with isolation
- using applications which require build tooling at runtime (for example
triton) - reproducing visual studio bugs
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.
This issue has been open for 30 days with no updates. no assignees, please provide an update or close this issue.