Closed mthalman closed 1 year ago
Visual Studio limits what we can do here with the channels that they provide. For VS 17, channels only exist for "Current" and each of the LTSC releases. The Current channel gets updated with each release; it essentially points to the latest version. Effectively, what this means is that we can't target a past Current release (e.g. 17.1). We're limited to only being able to pin to an LTSC version.
Given that we do want to install Current versions, not just LTSC versions, I think what this means is that this proposal is not doable.
Instead, I think we should update the Dockerfiles to remove the illusion that it's pinned to a version due to the use of a very specific-looking URL (e.g. https://download.visualstudio.microsoft.com/download/pr/dc2793e9-7b80-4f11-9e33-85833e8921a6/06293b7db26d35bf19253f8059bf9feeb97d34236c02970afd1931f5e4da6da7/vs_BuildTools.exe
). And instead replace it with a more approachable and representative URL: https://aka.ms/vs/17/release/vs_buildtools.exe
.
@MichaelSimons - LMK your throughts.
This is unfortunate as it breaks a key best practice of Dockerfiles. Given the limitation, I agree with your proposal that we should go with an approach that makes the behavior more transparent.
This won't be implemented due to the lack of stable URLs from VS for each release. They only provide stable URLs for LTS versions.
The intention with the VS tools installation URLs in the SDK Dockerfiles is to be pinned to a specific major/minor version. This allows the community to build with an older version of the Dockerfile and get the expected older version of VS tools.
That's not what's currently happening however. The URL is pointing to a specific version of the bootstrapper. But that bootstrapper is configured to install the latest version. As an example, if the URL points to the VS 17.2 Build Tools bootstrapper, it will actually install VS 17.3 Builds Tools (assuming 17.3 is latest).
This is actually documented:
To fix this, the channel should be explicitly set when running the install.