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

(Public Beta) Windows Server 2022 with Visual Studio 2022 is now available #3949

Closed
maxim-lobanov opened this issue Aug 23, 2021 · 57 comments
Closed

Comments

@maxim-lobanov
Copy link
Contributor

maxim-lobanov commented Aug 23, 2021

Windows Server 2022 availability 🚀

Hello everyone!

We are happy to announce that Windows Server 2022 is available for GitHub Actions and Azure DevOps users 🥳
You can use windows-2022 image label in your YAML to select this image.

GitHub Actions

jobs:
  jobName:
    runs-on: windows-2022

Azure DevOps

jobs:
- job: jobName
  pool:
    vmImage: 'windows-2022'

"Beta" status

The image is marked as "beta" for now. It means some software can be unstable on the new platform. Also there could be queueing issues as the capacity will be balanced only throughout the next weeks.
Known issues:

  • Some build software is not compatible with Visual Studio 2022 yet (For example: Bazel)
  • Some Azure DevOps tasks don't work on the new platform properly yet: VSBuild, MSBuild, UsePython (PyPy only)

Please report any problems with the new image to this repository.
Any issues related to Azure DevOps tasks should be reported to https://github.com/microsoft/azure-pipelines-tasks.

Software differences

The full documentation of Windows Server 2022 image can be found in image README.
The software set is different between Windows Server 2019 and 2022. We have deprecated some legacy software with low usage and temporarily disabled software that is not supported on the new platform yet. Also, for tools with multiple installed versions we have reconsidered the list of versions based on usage.

Please find differences in the table below:

Tool name Windows 2019 Windows 2022 Notes
Windows Server 2019 (10.0.17763 Build 2061) 2022 (10.0.20348 Build 112)
Visual Studio 2019 (16.10.31515.178)
Workloads: recommended + custom + wix components
2022 Preview (17.0.31521.260)
Workloads: recommended set
Our policy is installing one VS version per platform. On Windows Server 2022, we install only VS 2022 (it is in Preview for now but will be released in future).
If your use-case requires using VS 2019, continue using Windows Server 2019 image. We don't have plans to deprecate it in near future.
Python Default version: 3.7.x
Architectures: x64 & x86
Pre-cached versions: 2.7, 3.5, 3.6, 3.7, 3.8, 3.9
Default version: 3.9.x
Architectures: x64
Pre-cached versions: 3.7, 3.8, 3.9
On GitHub Actions, actions/setup-python can install any version on-flight so this change doesn't impact users
PyPy 2.7, 3.6, 3.7 2.7, 3.7 Version 3.6 is officially deprecated in favor of 3.7 and is not updated anymore.
Ruby Default version: 2.5.x
Pre-cached versions: 2.4, 2.5, 2.6, 2.7, 3.0
Default version: 3.0.x
Pre-cached versions: 2.7, 3.0
On GitHub Actions, ruby/setup-ruby can install any version on-flight so this change doesn't impact users
Go Default version: 1.15.x
Pre-cached versions: 1.13, 1.14, 1.15, 1.16
Default version: 1.16.x
Pre-cached versions: 1.15, 1.16
If your use-case requires using any of these versions, consider using tasks to install Go on-flight:
- actions/setup-go (GitHub Actions)
- Go Tool Installer (Azure DevOps)
Java Default version: 8
Pre-installed versions: 8, 11, 13
Default version: 8
Pre-installed versions: 8, 11
Our policy is pre-installing only LTS versions of Java. if your use-case requires using non-LTS Java version, please consider using tasks to install it on-flight:
- actions/setup-java (GitHub Actions)
- Java Tool Installer (Azure DevOps)
Android Build-tools: >= 19.x
Platforms: >= 19.x
CMake: 3.10.2, 3.18.1
Google APIs: 21, 22, 23, 24
NDK: 21, 22
Build-tools: >= 27.x
Platforms: >= 27.x
CMake: 3.18.1
Google APIs: -
NDK: 21, 22
.NET Core SDK 2.1, 3.1, 5.0 3.1, 5.0 .NET Core 2.1 End Of Support is scheduled on August 21, 2021.
Please consider using tasks to install any version on-flight:
- actions/setup-dotnet (GitHub Actions)
- Use .NET Core (Azure DevOps)
Az modules Installed: 6.1.0
Zipped: 1.0.0, 1.6.0, 2.3.2, 2.6.0, 3.1.0, 3.5.0, 3.8.0, 4.3.0, 4.4.0, 4.7.0, 5.5.0, 5.9.0, 6.1.0
Installed: 6.1.0
Zipped: -
If your use-case requires using any of these versions, consider using tasks to install Az modules on-flight:
- azure-powershell-action (GitHub Actions)
- Azure PowerShell (Azure DevOps)
MSYS2 A lot of pre-installed msys packages Only pure MSYS2 is installed. No additional packages On Windows Server 2016 and 2019 we had a lot of pre-installed MSYS2 packages. We had a long discussion about "pre-installing them" vs "installing in runtime and caching". Our recommendation is using official setup-msys2 action to install packages on-flight and cache them.

The following software were not installed on Windows Server 2022 images by default: Miniconda, Google Cloud SDK, InnoSetup, NSIS, Perl, sbt, Cloud Foundry CLI, BizTalk Server and Client, WebPlatformInstaller, Windows Driver Kit

@maxim-lobanov maxim-lobanov pinned this issue Aug 23, 2021
znz added a commit to znz/ruby that referenced this issue Aug 26, 2021
Because patch does not installed on windows-2022.

actions/runner-images#3949
> Only pure MSYS2 is installed. No additional packages
znz added a commit to ruby/ruby that referenced this issue Aug 26, 2021
Because patch does not installed on windows-2022.

actions/runner-images#3949
> Only pure MSYS2 is installed. No additional packages
@maxim-lobanov maxim-lobanov changed the title Windows Server 2022 and Visual Studio 2022 availability Windows Server 2022 with Visual Studio 2022 is now available (Public Beta) Aug 27, 2021
@maxim-lobanov maxim-lobanov changed the title Windows Server 2022 with Visual Studio 2022 is now available (Public Beta) (Public Beta) Windows Server 2022 with Visual Studio 2022 is now available Aug 27, 2021
@maxim-lobanov maxim-lobanov changed the title (Public Beta) Windows Server 2022 with Visual Studio 2022 is now available [Public Beta] Windows Server 2022 with Visual Studio 2022 is now available Aug 27, 2021
@maxim-lobanov maxim-lobanov changed the title [Public Beta] Windows Server 2022 with Visual Studio 2022 is now available (Public Beta) Windows Server 2022 with Visual Studio 2022 is now available Aug 27, 2021
@miketimofeev miketimofeev unpinned this issue Sep 10, 2021
XrXr pushed a commit to Shopify/yjit that referenced this issue Sep 10, 2021
Because patch does not installed on windows-2022.

actions/runner-images#3949
> Only pure MSYS2 is installed. No additional packages
@robertmclaws
Copy link

Can you please update the Visual Studio version on this image to Preview 4? Thanks!

@miketimofeev
Copy link
Contributor

Hi @robertmclaws!
We always install the latest VS version available at the moment of image generation, so the preview 4 image should be accessible later this week.

@robertmclaws
Copy link

Thanks Mike! It's really cool that you folks have automated these releases and such... thanks so much for your efforts!

Would be really nice though if you folks could put out image updates day-and-date with Visual Studio releases, especially around major versions (like Release Candidates). OR give us an easy way to trigger VS updates from a task. It's tough to meet our deadlines when builds that run locally won't run in CI because VS releases in our pipeline are a week behind.

Thanks again!

@miketimofeev
Copy link
Contributor

@robertmclaws unfortunately, we are usually not aware of such major changes in VS beforehand. It would be great if you or any other VS user would create an issue here in advance next time so we can push the critical update on time rather than follow up our usual deployment schedule (start on Monday and finish on Wednesday-Thursday).

@miketimofeev miketimofeev pinned this issue Sep 22, 2021
@miketimofeev
Copy link
Contributor

@robertmclaws the new image with update VS has been deployed

@miketimofeev
Copy link
Contributor

@krokofant we are working on a migration plan and will announce the timeline a bit later.

@miketimofeev
Copy link
Contributor

We are going to stop treating the image as beta starting from November, 15.
The announcement available here
#4488

@nwaf999
Copy link

nwaf999 commented Dec 25, 2021

H

@TheRustifyer
Copy link

Hello.

How can I enable on the windows-2022 machine the support for the C++20 modules support? I need to "enable" this component like if it where selected in the visual studio installer to download it for vstudio.

I am getting this error on my Action, btw:

fatal error C1011: cannot locate standard module interface. Did you install the library part of the C++ modules feature in VS setup? 

@sylveon
Copy link

sylveon commented Jan 10, 2022

I would recommend moving away from import std.core; and back to #include <thing> or import <thing>;

The standard library was not modularized for C++20 so you're using a non-standard extension. Using #include or import <thing>; does not require to install an additional component. If you really need them, you can simply run the VS setup from a powershell script:

Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Preview"
$componentsToAdd = @(
  # add components here, i don't know the name of the component with the standard library modules
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
    Write-Host "components have been successfully added"
}
else
{
    Write-Host "components were not installed"
    exit 1
}

@TheRustifyer
Copy link

So I must add the modules component, copy paste your script into my project and create a new named action inside the current one?

That location (Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer") is the real location of the preinstalled msvc2022 on the windows-2022 machine?

@sylveon
Copy link

sylveon commented Jan 10, 2022

That location (Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer") is the real location of the preinstalled msvc2022 on the windows-2022 machine?

yes

@TheRustifyer
Copy link

TheRustifyer commented Jan 11, 2022

I found the name of the component, but I am getting no success with this way

Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Preview"
$componentsToAdd = @(
    'Microsoft.VisualStudio.Component.VC.Modules.x86.x64'
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
    Write-Host "components have been successfully added"
}
else
{
    Write-Host "components were not installed"
    exit 1
}

The output:

Run ./.github/scripts/setup_msvc.ps1
  ./.github/scripts/setup_msvc.ps1
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    BUILD_TYPE: Release
components were not installed
Error: Process completed with exit code 1.

@TheRustifyer
Copy link

@sylveon sorry, but I am not being able of make the script works. I get the name of the component directly from the Microsoft page.
Do you think I am missing something?

Thanks!

t-b added a commit to t-b/json that referenced this issue Jan 25, 2022
This is available in github actions since some time now [1].

[1]: actions/runner-images#3949
nlohmann pushed a commit to nlohmann/json that referenced this issue Jan 26, 2022
)

* .github/workflows/windows.yml: Add support for Visual Studio 2022

This is available in github actions since some time now [1].

[1]: actions/runner-images#3949

* README.md: Add VS 2022 [skip ci]

The version and the build engine version (aka MSBuild version) were
taken from [1].

[1]: https://github.com/actions/virtual-environments/blob/win22/20220116.1/images/win/Windows2022-Readme.md
larskanis added a commit to oneclick/rubyinstaller2 that referenced this issue Feb 18, 2022
@dougmassay
Copy link

Not excited that InnoSetup is no longer included on windows-latest.

ax4 added a commit to DanmakuTree/DanmakuTree that referenced this issue Mar 27, 2022
Because GH now use windows-2022 as the windows-latest, see: actions/runner-images#3949
kavilla added a commit to kavilla/OpenSearch-Dashboards-1 that referenced this issue May 8, 2023
Windows 2019 images uses chrome version 112.
Ref: https://github.com/actions/runner-images/pull/7494/files

Windows 2022 (latest) images uses chrome version 113.
Ref: https://github.com/actions/runner-images/pull/7528/files

Windows 2019 is still updated regularly. Differences:
actions/runner-images#3949

Signed-off-by: Kawika Avilla <[email protected]>
@alexreinking
Copy link

alexreinking commented May 31, 2023

@Pyzyryab -- did you ever solve the C++ modules issue? It's been affecting me, too. The documentation makes it sound like Microsoft.VisualStudio.Component.VC.Modules.x86.x64 is already installed in the windows-2022 image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests