runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

`vcvarsall.bat` from VS 2019 has recently stopped setting `VCToolsRedistDir`

Open guihkx opened this issue 4 months ago • 3 comments

Description

The vcvarsall.bat script from Visual Studio 2019 has recently stopped setting the VCToolsRedistDir environment variable.

I have a build step that uses this action, which essentially invokes vcvarsall.bat from Visual Studio 2019, and "forwards" every environment variable set by that script to subsequent build jobs.

3 weeks ago, the vcvarsall.bat script would still set VCToolsRedistDir, but now it doesn't.

It's not clear to me why, but it felt appropriate to report it here.

Platforms affected

  • [ ] Azure DevOps
  • [X] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [ ] Ubuntu 24.04
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] macOS 15
  • [ ] macOS 15 Arm64
  • [X] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

20241015.1.0: https://github.com/nuttyartist/notes/actions/runs/11418927860/job/31772946804#step:4:28

Is it regression?

Yes. 20240922.1.0: https://github.com/nuttyartist/notes/actions/runs/11128027843/job/30922790999#step:4:29

Expected behavior

The VCToolsRedistDir environment to be set after running vcvarsall.bat.

Actual behavior

VCToolsRedistDir is not set anymore.

Repro steps

name: Test VCToolsRedistDir

on:
  workflow_dispatch:

jobs:
  test:
    runs-on: windows-2019
    steps:
      - name: Check if VCToolsRedistDir exists
        shell: cmd
        run: |
          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
          :: Check if VCToolsRedistDir is set
          if not defined VCToolsRedistDir (
            echo Error: Environment variable VCToolsRedistDir is not set.
            exit /b 1
          )

guihkx avatar Oct 19 '24 16:10 guihkx