1
votes

I am writing a custom VS extension that contains a Azure DevOps custom build task. I am following the docs here: https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts

Here are the steps I follow:

  1. Publish a new version of my extension (say 0.1.4)
  2. Uninstall and reinstall the extension in a test organization
  3. Update a Pipeline to use the custom task provided by extension
  4. Run Pipeline

The issue is that a previous cached version of the custom task (0.1.0) is used. How do I force Pipelines to use the custom task from the new version (0.1.4)?

Thanks!

1
Same problem here. I suspect that if you change only the version patch it ignores and maintains the task cache. But if you change the minor or major the task is updatedGabriel Anderson

1 Answers

0
votes

Figured it out.

The extension's version number (from vss-extension.json) is independent from the task's version number (from task.json).

Azure Pipelines will use the latest minor/patch version for a given major version of the task independent of the extension version number.

No need to uninstall/reinstall the extension - everything works automatically after you publish a new minor/patch version for the task.