Search code examples
nugetazure-pipelinesazure-pipelines-yamlazure-pipelines-build-task

Older NuGet tasks are going to be removed from Azure DevOps


If you're still using an older version of the nuget tasks in your Azure Pipelines, you may be getting the following message in the logs:

If you're using the NuGet Restore v1 and NuGet Installer v0 pipeline tasks, promptly transition to the NuGetCommand@2 pipeline task. You'll begin receiving alerts in your pipelines soon if the transition hasn't been made. If no action is taken, starting November 27, 2023, your builds will result in failure.

I understand that the best course of action is to migrate from the old tasks to the new ones, but what if I have old branches that I need to keep for compliance reasons? Or what if there are teams that can't fix this before November 27th?


Solution

  • It's not 100% clear what's going to happen in November 27th, but it looks like the tasks are going to be deleted from the Azure DevOps organization remotely.

    Fortunately, the older builds of these tasks are still available and you can patch them and upload them back into your Azure DevOps organization.

    You can find the required Nuget taskzips for this in the Azure-Pipelines-Tasks-Zips project. And use the install script to push the task back into the collection after it has been removed.

    Alternatively you can install a copy of these Nuget tasks as an extension. In this case you will have to edit your pipelines, because it's not possible to publish an extension containing tasks with offical task names in it:

    - tasks: NugetRestore@1
    

    Will become:

    - task: NuGetRestore-deprecated@1