Windows 2016 hosted runners will be removed from GitHub actions and Azure DevOps on March 15, 2022 initially. The removal postponed until June 30, 2022
Removing Windows 2016 will have a direct impact on all CI/CD pipelines using this environment and especially Sitecore.
What this really means ?
In this post, i will take the configuration below :
- Azure DevOps pipelines
- Cake for build
Today, the mostly Sitecore pipelines on Azure DevOps use VS2017, hosted on windows 2016 to build Sitecore artifacts.
Without any modification, the pipelines will stop working after this date. So, you will have a build error like below.
Recommended Solution :
The recommended solution by Azure DevOps team is to change jobs using Windows-2016 to Windows-latest.
well, let’s see that !
I changed the agent specification to Windows-latest on build pipeline section.
Let’s run the pipeline again et see..
I still have the same error.
Solution for our case :
- Change MS Build tool version from MSBuildToolVersion.VS2017 to MSBuildToolVersion.VS2019 on build.cake file.
- Change the agent specification to Windows-2019
Cake build OK and artifact created 🙂
References : https://github.com/actions/virtual-environments/issues/4312