I think this issue is related to 1582433 .
Installation of VS2019 Build Tools into container installs VS2022 version rather than VS2019.
I am trying to setup a TeamCity agent that runs in docker.
I want to install Visual Studio 2019 Build Tools on this TeamCity agent. I am following the instructions described on this page: https://learn.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019#create-and-build-the-dockerfile
When I build the docker image, I notice that it installed 2022 version rather than the 2019 version. I have tried to install Visual Studio 2017 Build Tools as well, but it installs the 2022 version.
Here is the Dockerfile that I am running: 176784-dockerfile.txt . I have updated it to use powershell commands rather than cmd commands.
Steps to reproduce:
- Get Docker
- Configure Docker to use Windows Containers
- Download the Dockerfile.txt and remove the txt extension
- Build the image:
docker build -t can/teamcity-agent:2021.2.3-windowsservercore-2004 .
- Run the container
- Inspect the container and see the C:\Program Files (x86)\Microsoft Visual Studio\
- Notice folder named 2022