Windows Server 2022 with Visual Studio 2022 is now generally available on GitHub-hosted runners. To use it now, simply add
runs-on: windows-2022 in your workflow file. Otherwise, our recommendation is to use
windows-latest, which currently utilizes Windows 2019 but will begin running on Windows 2022 in the near future. This will ensure your workflows are always using a recent OS and removes the need to constantly update workflow files with image versions.
jobs: build: runs-on: windows-2022 steps: - uses: actions/checkout@v2 - uses: actions/setup-dotnet@v1 - name: Build run: dotnet build - name: Run tests run: dotnet test
The Windows Server 2022 runner image has different tools and tool versions than Windows Server 2019.