Reference for creating custom build/release tasks within extensions

Custom build task JSON

When creating a custom build or release task with an extension, your extension will include a task.json file for each build or release task. This file describes the build or release task and is what the build system uses to render configuration options to the user and to know which scripts to execute at build time.

The build/release task SDK documentation is here.

Bundle multiple versions of build/release tasks within one extension

You can now include multiple versions of a build or release task in your extension. This can be helpful if you want to roll out future versions of your extension without interrupting service of users running older versions. The table below shows the layout for having multiple versions in one extension.

Traditional extension layout

  • extensionManifest.json
  • extensionIcon.png
  • Task1
    • task.json
    • taskIcon.png
    • taskScript.ps1

Multiple version layout

  • extensionManifest.json
  • extensionIcon.png
  • Task1
    • Task1V1
      • task.json
      • taskIcon.png
      • taskScript.ps1
    • Task1V2
      • task.json
      • taskIcon.png
      • taskScript.ps1
  • Task2
    • Task2V1
      • task.json
      • taskIcon.png
      • taskScript.ps1
    • Task2V2
      • task.json
      • taskIcon.png
      • taskScript.ps1

Note

The code will look for the task.json file inside the task folder. If one is not found, it will look just one level deeper. An error will be thrown if one is not found in either level.