简体   繁体   English

缺少Azure DevOps自定义扩展图标

[英]Azure DevOps custom extension icon missing

I have built an extension for Azure DevOps following this tutorial: 我已按照本教程为Azure DevOps构建了扩展:

https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=vsts

Then I upload it to Azure DevOps and share it only with my organization. 然后,我将其上传到Azure DevOps并仅与我的组织共享。

The problem is that when I open a build definition and click to add more tasks, the icon for my extension is missing: 问题是,当我打开构建定义并单击以添加更多任务时,扩展名的图标丢失了:

click here to view image 点击这里查看图片

I have followed the suggestions in the post below but nothing worked: 我遵循以下帖子中的建议,但没有任何效果:

Why TFS Build Step Extension Icon Is Missing? 为什么缺少TFS Build Step Extension图标?

Does anyone have a suggestion? 有人有建议吗?

Thanks, 谢谢,

The tutorial does not mention that there also needs to be an icon named icon.png in the same folder as the task.json file. 本教程没有提到在task.json文件task.json文件夹中还需要有一个名为icon.png的图标。 Also make sure the icon is 32 x 32 px. 还要确保图标为32 x 32像素。 There is some documentation here: Reference for integrating custom build tasks into extensions 这里有一些文档: 将自定义构建任务集成到扩展中的参考

You need to provide two files with icons, first one in your root folder and second one in the task folder. 您需要提供两个带有图标的文件,第一个在您的根文件夹中,第二个在任务文件夹中。 Also you should remember that icon should be 128x128 px or larger. 另外,您还应该记住图标应为128x128像素或更大。 Here you could see the example of your extension's folder structure: 在这里,您可以看到扩展程序的文件夹结构示例:

  • extensionManifest.json extensionManifest.json
  • icon.png 的icon.png
  • taskFolder taskFolder

    • task.json task.json
    • icon.png 的icon.png
    • index.js index.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM