We have a self-hosted Azure DevOps Server 2019 for which I have created my own widget using the tutorial https://learn.microsoft.com/en-us/azure/devops/extend/develop/add-dashboard-widget?view=azure-devops-2019.
I was also able to successfully add the extension to the server and the extension is also visible.
However, when I edit my dashboard, my newly created widget is not displayed. What could be the reason for this?
Furthermore, I also installed the extension VstsDashboardWidgetProjectTemplate (https://github.com/GregTrevellick/VstsDashboardWidgetProjectTemplate) in Visual Studio and also created an extension/widget from it. Unfortunately with the same result that I can install and see the extension, but not the actual widget.
I am attaching the vss-extension.json file as I suspect this is where the error is most likely to be found. However, I can also supply the other files if needed.
{
"manifestVersion": 1,
"id": "MyVeryFirstCustomExtension",
"version": "1.0.0",
"name": "My Very First Custom Extension",
"description": "Samples containing different widgets extending dashboards",
"publisher": "MyCompany",
"categories": [
"Azure Boards"
],
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"icons": {
"default": "img/logo.png"
},
"contributions": [
{
"id": "HelloWorldWidget",
"type": "ms.vss-dashboards-web.widget",
"targets": [
"ms.vss-dashboards-web.widget-catalog"
],
"properties": {
"name": "Hello World Widget",
"description": "My first widget",
"catalogIconUrl": "img/CatalogIcon.png",
"previewImageUrl": "img/preview.png",
"uri": "hello-world.html",
"supportedSizes": [
{
"rowSpan": 1,
"columnSpan": 2
}
],
"supportedScopes": [
"project_team"
]
}
}
],
"files": [
{
"path": "hello-world.html",
"addressable": true
},
{
"path": "sdk/scripts",
"addressable": true
},
{
"path": "img",
"addressable": true
}
],
"scopes": [
"vso.work"
]
}
Related
I am part of VS performance team, I need to create a new tab for the Release result page.Release result page
Previously it was possible with the target ms.vss-releaseManagement-web.release-details-view but that no longer works on the new experience, do you know how the contribution configuration should look?, this is what I have so far:
"id": "pit-tab",
"type": "ms.vss-releaseManagement-web.release-summary-tab",
"targets": [
"ms.vss-releaseManagement-web.release-details-view"
],
"properties": {
"name": "Performance",
"uri": "dist/index.html",
"order": "99",
"icon": "asset://img/icon.png",
"supportsMobile": true
}
Try with below script:
{
"id": "release-environments-tab",
"type": "ms.vss-web.tab",
"description": "Adds a 'Merlin Insert' tab to the release environment.",
"targets": [
"ms.vss-releaseManagement-web.release-environment-editor-tab"
],
"properties": {
"name": "Merlin Insert",
"order": "30",
"uri": "index.html"
}
},
Please help to read the configuration values from the configuration contribution point. In the ${extension_path}\package.json I how following section:
{
"name": "markdown-table-of-contents",
"displayName": "Generate table of contents for markdown",
"publisher": "dkultasev",
"description": "",
"version": "0.0.1",
"engines": {
"vscode": "^1.31.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:extension.sqlGenerateYAMLComment"
],
"main": "./out/extension.js",
"contributes": {
"configuration": {
"title": "Default name to use for YAML comment block",
"properties": {
"markdown-table-of-contents.author_name": {
"type": [
"string",
"Change Name"
],
"default": null,
"description": "Specify default name when generating YAML comment block"
}
}
}
...
then in the extension_folder\.vscode\settings.json I have setting "markdown-table-of-contents.author_name": "Dmitrij Kultasev" and in the extension code I'm trying to get these values:
const name = vscode.workspace.getConfiguration('markdown-table-of-contents').get('author_name');
and it is Change Name but I expect Dmitrij Kultasev as configured in settings.json file
Currently I have build an Azure DevOps extension with a menu item who is visible for everyone. This was not a problem, but now we want to hide some of the pages for specific user groups.
I can only find limited information about setting up custom menu items and I didn't find any solution how to make the menu item role or team based.
Below you can see my current extension file. Can anyone tell me how to solve this problem?
{
// ...
"contributions": [
{
"id": "xxx-hub-group",
"type": "ms.vss-web.hub-group",
"description": "XXX",
"targets": [
"ms.vss-web.project-hub-groups-collection"
],
"properties": {
"name": "XXX",
"icon": "img/xxx.png"
}
},
{
"id": "sub-xxx",
"type": "ms.vss-web.hub",
"description": "sub-xxx",
"targets": [
".xxx-hub-group"
],
"properties": {
"name": "sub-xxx",
"title": "sub-xxx",
"icon": "img/sub-xxx.png",
"uri": "pages/sub-xxx.html",
"supportedScopes": [
"project_team"
]
}
}
]
}
I'm working on an Azure Data Factory V2 Pipeline but I having a problem when I try to execute a "Custom activity" inside an "If Condition Activity".
If I try to test my pipeline with "Test Run" button on the ADF's Web interface, this error appeare:
{"code":"BadRequest","message":"Activity PPL_ANYFBRF01 failed: Invalid linked service reference. Name: LNK_BATCH_AZURE","target"...}
I'm sure that there is no error in the linked service reference's name. If I create a "Custom Activity" directly in my pipeline, it's working.
I think it can be a syntax error on my activity but I can't find it.
Here is my "If Condition Activity"'s Json template (the expression "#equal(0,0)" is just for testing purpose):
{
"name": "IfPointComptageNotExist",
"type": "IfCondition",
"dependsOn": [
{
"activity": "PointComptage",
"dependencyConditions": [
"Succeeded"
]
},
{
"activity": "SousPointComptage",
"dependencyConditions": [
"Succeeded"
]
}
],
"typeProperties": {
"expression": {
"value": "#equal(0,0)",
"type": "Expression"
},
"ifTrueActivities": [
{
"type": "Custom",
"name": "CustomActivityTest",
"linkedServiceName": {
"referenceName": "LNK_BATCH_AZURE",
"type": "LinkedServiceReference"
},
"typeProperties": {
"command": "Batch.exe",
"resourceLinkedService": {
"referenceName": "LNK_BLOB_STORAGE",
"type": "LinkedServiceReference"
},
"folderPath": "/test/app/"
}
}
]
}
},
Thank you in advance for your help.
The problem is now solved. I have recreate the pipeline and it's working now.
Regards,
Julien.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have followed multiple guides and created a VSIX for my build steps. I had an admin upload them and install them to my team project collection. The problem is when I look at the build they aren't available to pull in as tasks. What do I need to do to make them show up?
I have attached the screen shot below of it uploaded. And also a redacted copy of my json config files. I have no idea what is wrong. I also tried using the tfx tool to upload it but it is asking for a personal access token.
I don't believe it is available in 2015. I tried using the workaround but fiddler was giving me a bad header error. If anyone can point out my error it would be greatly appreciated.
vss-extension.json
{
"manifestVersion": 1,
"id": "Archive-Source-Task",
"name": "Archive Source",
"public": false,
"version": "1.0.1",
"publisher": "redacted",
"description": "Copy the source",
"targets": [
{
"id": "Microsoft.VisualStudio.Services"
}
],
"categories": [
"Build and release"
],
"files": [
{
"path": "Task"
},
{
"path": "bin"
}
],
"contributions": [
{
"id": "Archive Source",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "task"
}
}
],
"tags": [
"Build",
"Release",
"Management",
"Utility",
"Tasks"
]
}
task.json
{
"id": "27203bc5-f3f1-4f80-b2ea-8f62dd4790f1",
"name": "Archive Source",
"description": "Copies your source",
"helpMarkDown": "",
"category": "Utility",
"author": "",
"version": {
"Major": 1,
"Minor": 0,
"Patch": 0
},
"groups": [
{
"name": "advanced",
"displayName": "Advanced",
"isExpanded": false
}
],
"instanceNameFormat": "Archive Source",
"visibility": [
"Build"
],
"execution": {
"PowerShell": {
"target": "$(currentDirectory)\\ArchiveSource.ps1",
"argumentFormat": "",
"workingDirectory": "$(currentDirectory)"
}
}
}
According to the files section in your vss-extension.json file:
"files": [
{
"path": "Task"
},
{
"path": "bin"
}
],
I suspect that the folder you use to place the task files is named as "Task" instead of "task", so in the contribution section, you should also use "Task" in properties:
"contributions": [
{
"id": "Archive Source",
"type": "ms.vss-distributed-task.task",
"targets": [
"ms.vss-distributed-task.tasks"
],
"properties": {
"name": "Task"
}
}
],
When we were using TFS 2015 we deployed our task like described in this article: https://blogs.infosupport.com/custom-build-tasks-in-tfs-2015/
The main difference is that you don't need vss-extension.json and you deploy it with the power shell script that is provided in this link.
Later when we migrated to TFS 2017 we had to change our build tasks to deploy it like you do.