Why TFS Build Step Extension Icon Is Missing?
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.
- The image file must be named
icon.png
. - The image file must be in the same folder as
task.json
. - 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.
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"
}
}