问题
The new azure extension development documentation points to a sample project in github where you can see different extension examples targeting different areas of the of the azure DevOps portal. However I am not able to find any documentation regarding all available contribution targets. Where do I find that information.
For instance one of the samples in the repo shows how to add a new menu option to the repository picker. This is how the contribution snippet looks:
{
"contributions": [
{
"id": "sample-repository-picker-action",
"type": "ms.vss-web.menu-item",
"targets": [ "ms.vss-code-web.command-bar-repository-picker-actions" ],
"properties": {
"text": "Sample repository picker action",
"uri": "dist/RepositoryActions/RepositoryActions.html",
"iconName" : "Add",
"registeredObjectId": "sample-repository-action"
}
}
]
}
As you can see they target ms.vss-code-web.command-bar-repository-picker-actions
Where do i find documentation of all the different targets available?
What I have tried is inspecting the azure DevOps portal with chrome Devtools hoping to see the target string as an html attribute in any of the elements. That was just a wild guess. This seems like an important piece of information to be documented for extension creation, where are those?
回答1:
You can install the Contributions Guide extension from Microsoft.
This extension is designed to help extension developers discover the various components of Visual Studio Team Services that can be targeted by contributions from third party extensions, as well as the context data that is available at each target.
In addition, you can find a long list here and here.
来源:https://stackoverflow.com/questions/58716740/where-can-i-find-all-available-contribution-targets-for-the-new-azure-devops-ext