I need to identify whether a build task is getting executed in TFS or in VSTS, this logic need to execute from build task itself at execution time.
Is there an environment variable to get this value?
Thanks in advance.
I need to identify whether a build task is getting executed in TFS or in VSTS, this logic need to execute from build task itself at execution time.
Is there an environment variable to get this value?
Thanks in advance.
There is no environment variable that would readily tell you if the environment that the task is running on is hosted or on-premise.
You could probably look at the System.TeamFoundationCollectionUri
variable and put some logic around that. A hosted environment will always contain visualstudio.com