-
Notifications
You must be signed in to change notification settings - Fork 52
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
Choco install visualstudio2017-workload-vctools
no longer works on windows-2019
#97
Comments
As I wrote in that issue. in order to try to determine the cause, I need:
|
I'm not a Windows guy but I just used GitHub Actions using the workflow file in the other ticket and it looks like the run has all the files you need. Failed run with artifact attached with logs: https://github.com/collinpeters/win-vs-test/actions/runs/643660346 For reference the workflow file is:
|
Revert back once jberezanski/ChocolateyPackages#97 is fixed.
Oh dear, this is a tough one. The image you are using already contains a version of Visual Studio 2019 Enterprise. Both VS 2017 and 2019 are serviced (installed/updated) by the same helper program, the Visual Studio Installer. The version of the Visual Studio Installer present in the image is sufficiently new to support the newest VS 2017, but is older than required for the newest VS 2019. When the package for VS 2017 invokes the Installer, telling it to install VS 2017, the Installer ignores that request at first*, looks at the already installed Visual Studio instances, sees the VS 2019 Enterprise, checks the Installer version required by the newest VS 2019 update, decides that its own version is too old and refuses to install anything. To add insult to injury, it returns a "success" exit code (0), so the package does not even know the installation of VS 2017 was not done. * - to make matters even worse, my tests show that this is nondeterministic - the check for updates to already installed VS instances seems to happen asynchronously (on a background thread?) in the VS Installer, so sometimes the installation of VS 2017 will proceed sufficiently quickly to win the race and finish successfully before the VS Installer detects the VS 2019 update and decides it is outdated, and at other times the 2019 update detection will run before the Installer starts installing VS 2017 and the Installer refuses to perform the installation. Evidence:
I'm not sure how to tackle this problem yet. The current packages already do know how to detect the fact that the VS Installer is outdated and are able to update it, but this logic is currently based on the requirements of the VS product being installed by the package. So the package for VS 2017 Build Tools knows how to obtain the minimum VS Installer version required for VS 2017 Build Tools - but not for other VS products which may already be installed on the machine... I need to think about it. Meanwhile, you may try this workaround: in your workflow, update the already installed Visual Studio 2019 Enterprise first. This will have the side effect of updating the VS Installer to the newest version required by VS 2019, so the problem with VS 2017 should not appear. In other words:
|
It seems that the VS Installer, before it quits with exit code 0, launches a separate process (which eventually lanuches additional processes) in order to 1) updates the installer, 2) perform the originally requested action (install 2017 Build Tools). The problem is, this is done in separate processes which the original bootstrapper process (started by the package) does not wait upon, ignoring the The packages do try to handle this situation by detecting other VS Installer processes which are still running and waiting for them to finish. Unfortunately, the VS Installer internal architecture has changed with VS 2019 16.9 and it now uses a new process, which the packages do not know about. |
… version required by installed VS products The VS Installer checks all channels of already installed VS products to determine if it needs to be updated, not only the channel of the product being currently installed/modified. The extension should do that, too, to maintain control over the VS Installer processes (when the VS Installer self-updates, it does not respect --wait). The extension will not check the other channels if --noWeb is passed in package parameters (to avoid going online). Channel uris stored in the installed VS product metadata are used (so the same that the VS Installer would use). If a VS product was installed with updates turned off (by passing a blank channelUri to the installer), it is skipped. As before, passing --noUpdateInstaller turns off all VS Installer update logic in the extension. Related issue: GH-97
I think I found the issue. The problem is that $Path, $TMP, and $TEMP environment variables are set inside GitHub Actions (due to msys64 installation). Unsetting these fixes this error:
or other similar variable issues # backup variables
$env:Path=""
$env:TEMP=""
$env:TMP=""
# run installation
# restore the variables |
Building on the March 13, 2021 comment.
Both were reportedly installed, but there were ugly error messages accompanying the splash screen on the vctools part. DP |
I've had a very similar issue on the basic Amazon EC2 windows 2019 and 2022 AMI images. Apparently the |
@ndevenish |
The |
Cross-posting this from actions/runner-images#2857
I am having the same issue as the author there. Specifically that the install fails on the GitHub Actions Windows 2019 image which is itself unchanged.
Please see that issue for full details but I will copy/paste the error here.
The text was updated successfully, but these errors were encountered: