1
votes

To set constraints for an Azure DevOps extension to target Azure DevOps and Azure DevOps Server 2019 and later.

Are these the correct settings

  "targets": [
    {
      "id": "Microsoft.VisualStudio.Services.Cloud"
    },
    {
      "id": "Microsoft.TeamFoundation.Server",
      "version": "[17.0,)"
    }
  ]

and

  "demands": [
    "api-version/5.0"
  ]

I could not get the information from https://docs.microsoft.com/en-us/azure/devops/extend/develop/manifest.

Is there a list of targets and demands available?

1

1 Answers

0
votes

There is a list of supported targets and demands on the Extension Manifest Reference

Installation targets

  • Microsoft.VisualStudio.Services.Cloud: installs into Azure DevOps Services
  • Microsoft.TeamFoundation.Server: installs into TFS
  • Microsoft.VisualStudio.Services: installs into both. Shortcut for Microsoft.VisualStudio.Services.Cloud and Microsoft.TeamFoundation.Server version [14.2,)

Supported Demands

Type Description Checked at publish? Checked at install?
environment/cloud Requires running in a cloud environment Yes Yes
environment/onprem Requires running in an on-premises environment Yes Yes
api-version/{version} Requires a specific API version (minimum) No Yes
extension/{id} Requires a specific extension be installed/enabled No Yes
contribution/{id} Requires a specific contribution be available No Yes
contributionType/{id} Requires a specific contribution type be available No Yes

Is there any specific reason that the extension should run just on Sevrer 2019 (and not 2020)? If not you the demand towards the api version should be enough (see https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops#supported-versions) and select Microsoft.VisualStudio.Services as target, i.e:

"targets": [
    {
      "id": "Microsoft.VisualStudio.Services"
    }
]