Azure DevOps: Migrating to windows-latest

The windows-2016 environment will be deprecated on November 15, 2021, and removed on March 15, 2022. Migrate to windows-latest instead.
This is a scheduled windows-2016 brownout. The windows-2016 environment is deprecated and will be removed on March 15, 2022. For more details, see https://github.com/actions/virtual-environments/issues/4312

Microsoft is deprecating and removing the windows-2016 environments in DevOps in the coming months. Here's how to change the agent environment in your pipelines.

YAML

If you are using YAML for setup this is an easy fix. Just change the pool:vmImage setting to windows-2022

GUI configuration

If you are using the Classic GUI configuration the setting you need to change can be a bit harder to find.

Build pipelines

1. Find your pipeline and click on it.

2. Click Edit in the upper right corner

3. Select Pipeline and in the Agent Specification drop-down pick windows-2022.

4. Save

Releases

1. Go to Releases in your pipeline. Select the pipeline you want to change and click Edit.

2. Click the Tasks tab

3. Select Agent job and in the Agent Specification drop-down pick windows-2022.

4. Save

Note: Windows-2022 will be completely rolled out as the default windows-latest 6. March 2022.