4

I am trying to publish a private extension for AzureDevops on Visual Studio Marketplace. It is a .vsix package. The packaging goes well, I upload a package, but it doesn't pass a verification. I obtain the following error:

Extension validation error The task.json file was not found in contribution xxx

And I don't know why I get this one as I have a task.json file. It is the first time that I am trying to upload a package, so I really have no idea where the problem comes from.

KateHamster
  • 67
  • 1
  • 8

3 Answers3

4

As Shayki mentioned that is one possible cause for the issue. Another possible issue will be the folder/path name

Make sure you will give the same name for the files as the name of the properties

"contributions": [ 
     {
            "id": "..."
            "types": "..."
            "targets": "..."
            "properties": {
                  "name": "buildAndReleaseTask"
            }
      }
],
"files": [
    {
      "path": "buildAndReleaseTask"
    }
  ]

enter image description here

Jayendran
  • 9,638
  • 8
  • 60
  • 103
1

For anyone that stumbles upon this question, the JSON file with your task configuration literally needs to be named "task.json". In your extension file, you need to give the name for each of your tasks folders, in which there must be an individual task.json file.

1

In the vss-extension.json you have this section:

"contributions": [ 
     {
            "id": "..."
            "types": "..."
            "targets": "..."
            "properties": {
                  "name": "buildAndReleaseTask"
            }
      }
]

In my case the task.json was in buildAndReleaseTask folder, and the name in the properties was something else (the name you got in the error message), when I changed it to the name to buildAndReleaseTask (where the task.json exist) the error disappeared.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114