Installation of VS2019 Build Tools into container installs VS2022 version rather than VS2019.

Stefan Padurariu 1 Reputation point
2022-02-22T09:40:23.19+00:00

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:

  1. Get Docker
  2. Configure Docker to use Windows Containers
  3. Download the Dockerfile.txt and remove the txt extension
  4. Build the image: docker build -t can/teamcity-agent:2021.2.3-windowsservercore-2004 .
  5. Run the container
  6. Inspect the container and see the C:\Program Files (x86)\Microsoft Visual Studio\
  7. Notice folder named 2022
Developer technologies Visual Studio Setup
{count} votes

1 answer

Sort by: Most helpful
  1. Stefan Padurariu 1 Reputation point
    2022-02-22T13:49:33.11+00:00

    I think this issue is related to 1582433 .

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.