Why TFS Build Step Extension Icon Is Missing?

試著忘記壹切 提交于 2019-12-05 09:37:03

The task itself has its own icon and it must be stored in the same directory as the task.json and must be called icon.png and be 32x32 pixels and optionally an additional icon.svg can be put alongside it. This has to do with the fact that one extension can contain multiple build tasks, each build task then has its own icon. It's not referenced from the task.json, the correct file name will cause it to be picked up.

For an example, check my Azure Pipelines Snyk task. Also, if this is your complete extension manifest, then it's missing the Build task contribution point:

"contributions": [
{
  "id": "buildtask",
  "type": "ms.vss-distributed-task.task",
  "targets": [
    "ms.vss-distributed-task.tasks"
  ],
  "properties": {
    "name": "buildtask"
  }
}

The accepted answer is not correct for Microsoft Visual Studio Team Foundation Server version 15.105.25910.0. Perhaps it was correct for previous versions.

  1. The image file must be named icon.png.
  2. The image file must be in the same folder as task.json.
  3. The image file should be 32 x 32; no image scaling is applied.

The task.json file does not contain any reference to this file. It is located by using these conventions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!