需要在构建xaml模板中访问测试源spec参数

编程入门 行业动态 更新时间:2024-10-26 10:29:41
本文介绍了需要在构建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 noXAMLBuild environment variables for you to get the Test Source spec. All XAML build variables are listed in the document below:

msdn.microsoft/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 2015or upper version.I suggest youthat youcould 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 thesame 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参数

本文发布于:2023-11-24 12:25:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1625190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模板   参数   测试   xaml   spec

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!