Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vcvarsall.bat from VS 2019 has recently stopped setting VCToolsRedistDir #10819

Closed
2 of 15 tasks
guihkx opened this issue Oct 19, 2024 · 10 comments
Closed
2 of 15 tasks

vcvarsall.bat from VS 2019 has recently stopped setting VCToolsRedistDir #10819

guihkx opened this issue Oct 19, 2024 · 10 comments
Assignees
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows

Comments

@guihkx
Copy link

guihkx commented Oct 19, 2024

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
  • 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
  • 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:
  push:

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
Copy link
Author

guihkx commented Oct 20, 2024

I found a more recent build job that ran on 20241006.1.0 and still sets VCToolsRedistDir: https://github.com/nuttyartist/notes/actions/runs/11383332274/job/31668737205#step:4:29

So this regression(?) was introduced with 20241015.1.0.

guihkx added a commit to guihkx/notes that referenced this issue Oct 20, 2024
Recently, the "vcvarsall.bat" batch script from VS 2019 has stopped
defining the VCToolsRedistDir environment variable, for reasons unknown
so far [1].

We rely on that variable in CI to copy MSVC runtime DLLs to our Windows
packages, so this adds a workaround for when that variable is not set.

[1] actions/runner-images#10819
@hemanthmanga hemanthmanga self-assigned this Oct 21, 2024
@hemanthmanga
Copy link
Contributor

Hi @guihkx Thank you for bringing this issue to our attention. We are looking into this issue and will update you on this issue after investigating.

@zanieb
Copy link

zanieb commented Oct 21, 2024

I believe this may be the problem in indygreg/python-build-standalone#376 as well, but haven't been able to produce a fix yet to confirm.

@hemanthmanga
Copy link
Contributor

Hi @guihkx, Could you please try the latest version 20241021.1 and please update us, Thank you.

@guihkx
Copy link
Author

guihkx commented Oct 26, 2024

Could you please try the latest version 20241021.1 and please update us, Thank you.

Still unset: https://github.com/guihkx/notes/actions/runs/11532828745/job/32105052408

@hemanthmanga hemanthmanga added the investigate Collect additional information, like space on disk, other tool incompatibilities etc. label Oct 30, 2024
@dlux95
Copy link

dlux95 commented Nov 4, 2024

We are using Windows Server 2022 based container images with Visual Studio 2019 Build Tools and are also missing the VCToolsRedistDir environment variable. Last successful container image was built 3 weeks ago. As the system is in it's startup phase i don't have any exact version numbers. But it appears to me that this is a general Visual Studio 2019 issue and nothing specific to Github Actions or (as in our case) Gitlab Runners as well as regular container images.

Do you know the best way to raise an issue to Visual Studio developers about this?

@hemanthmanga
Copy link
Contributor

hemanthmanga commented Nov 5, 2024

Hi @dlux95, You can raise an issue here https://github.com/microsoft/vscode , Thanks.

@dlux95
Copy link

dlux95 commented Nov 5, 2024

Hi @dlux95, You can raise an issue here https://github.com/microsoft/vscode , Thanks.

Isn’t that only for Visual Studio Code related issues? I don’t think that’s the right place.

@hemanthmanga
Copy link
Contributor

Hi @dlux95, This is the URL which may be referred to for reporting the problem in a general https://learn.microsoft.com/en-gb/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022.

@guihkx
Copy link
Author

guihkx commented Nov 20, 2024

This has been fixed in either 20241104.2.1 or 20241113.3.1 (this one is more likely though, since it bumps Visual Studio 2019 to 16.11.35425.106).

Test run on 20241113.3.1: https://github.com/guihkx/notes/actions/runs/11532828745/job/33241425623

@guihkx guihkx closed this as completed Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Windows
Projects
None yet
Development

No branches or pull requests

4 participants