I have a VSTS extension with two build tasks, one build task should be available for both VSTS and TFS, the other one only for TFS. Is it possible to configure this for each build task via extension manifest?
How to limit build task only to VSTS not TFS
128 views Asked by Bandara At
3
There are 3 answers
4
On
Make the extension manifest indicates that the extension is available only for Team Services (targets = Microsoft.Visualstudio.Services.Cloud
).
0
On
There isn't any way to achieve this via extension manifest file. A good workaround is just as jessehouwing mentioned: Combine the two build tasks into one, provide an option in build setting to let user select or detect the build environment when running the build task. If TFS is selected or detected, run the code in the two build tasks, otherwise just run the code in the first build task.
I have used the following workaround to display message and discontinue the build in TFS.