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.

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-latest.

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-2019 which at the time of writing is windows-latest.

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 windows-2019 in the Agent Specification drop-down which at the time of writing is windows-latest.

4.   Save