需要在构建xaml模板中访问测试源spec参数 [英] Need to access Test sources spec argument in build xaml template

查看:58
本文介绍了需要在构建xaml模板中访问测试源spec参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 

我需要访问自定义xaml模板中的一个参数,将其作为参数传递给其中一个批处理文件。请您告诉我如何得到它。它的类型为BuildParameter"Test Sources spec"。如何得到它?

I need to access one of the argument in customized xaml template to pass it as a argument to one of the batch file.Could you please tell me how to get that.It is of type BuildParameter "Test Sources spec".How to get it?

推荐答案

嗨Nagasree,

Hi Nagasree,

谢谢在这里发布。

没有  XAML 构建环境变量,您可以获得测试源规范。所有XAML构建变量都列在下面的文档中:

There's no XAML Build environment variables for you to get the Test Source spec. All XAML build variables are listed in the document below:

https://msdn.microsoft.com/library/hh850448%28v=vs.120%29.aspx?f=255&MSPPError=-2147217396

关于这些变量,它们可以在XAML Build中使用如下所示。

About these variables, they could be used like this below in XAML Build.

echo Hello World from %TF_BUILD_BUILDDEFINITIONNAME%

对于您的请求,如果您使用的是TFS 2015或更高版本。我建议您使用
VNext 构建不是XAML构建。在VNext版本中,仍然没有环境变量 为了获得测试源规范。但是在VNext版本中,有一种解决方法可以创建

用户定义的变量
并将值设置为与测试源规范相同的值。然后在bat文件中,使用此方法获取用户定义变量的值:

For your request, if you are using TFS 2015 or upper version. I suggest you that you could use VNext build not XAML build. In VNext build, there still not  environment variables  for you to get the Test Source spec. But in VNext build, there's a workaround that you could create a user-defined variables and set the value the same as the Test Source spec. Then in the bat file, use this method to get the value of your user-defined variables:

%VariableName%。 这个用户定义的变量方法在XAML构建中不受支持。

%VariableName%. And this user-defined variable method is not support in XAML build.

最好的问候


这篇关于需要在构建xaml模板中访问测试源spec参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆