The Windows-2019 runner image in Azure DevOps is being deprecated, and pipelines using the Windows-2019 hosted agent display a warning recommending a switch to a newer hosted agent. However, after changing the agent, build pipelines may break due to dependency and environment differences. This blog explains a NuGet restore failure that occurred after switching to Windows-2022 and provides a solution for it.
Warning: The windows-2019 runner image is being deprecated, consider switching to windows-2022 (windows-latest) or windows-2025 instead