microsoft / tfs-cli

Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
MIT License
369 stars 132 forks source link

Allow fully-qualified property names to be specified in VSTS extension manifest #276

Open willsmythe opened 6 years ago

willsmythe commented 6 years ago

Today a VSTS extension developer can specify properties in the VSTS extension manifest file (via galleryProperties) that get represented as properties in the .vsix manifest. However the property keys added to the .vsixmanifest get prepended with Microsoft.VisualStudio.Services.GalleryProperties.. This makes it difficult to set well-known properties like Microsoft.VisualStudio.Services.Resource.Cloud.ActionButtonLabel.

Suggestion is to not prepend Microsoft.VisualStudio.Services.GalleryProperties if the key starts with Microsoft..

So this ...

{
"galleryProperties": [
        {
            "Microsoft.VisualStudio.Services.Resource.Cloud.SomePropA": "someValue1",
            "Microsoft.VisualStudio.Services.Resource.Cloud.SomePropB": "someValue2"
        }
    ]
}

... would get represented like this in the .vsixmanifest:

<Property Id="Microsoft.VisualStudio.Services.Resource.Cloud.SomePropA" Value="someValue1" />
<Property Id="Microsoft.VisualStudio.Services.Resource.Cloud.SomePropB" Value="someValue2" />
willsmythe commented 6 years ago

@trevorsg - having trouble building tfs-cli locally. Haven't found the obvious problem yet. I pushed a potential fix (see https://github.com/Microsoft/tfs-cli/commit/cb78e291dcc85ef78ce2da735d4c277e364e011c) for this if you want to grab/review/fix/publish.