1

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.

4

1 回答 1

1

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

于 2016-12-01T05:54:37.623 回答