[英]vNext TFS 2015 QueryBuildDefinition function in powershell not finding my build definition
Trying to call the following within a PowerShell script which is called from a new vNext Build step: 尝试在从新的vNext构建步骤调用的PowerShell脚本中调用以下内容:
$buildDef = $buildServer.QueryBuildDefinitions($project)
Would have thought that this would return all the build definitions in my project. 本来以为这会返回我项目中的所有构建定义。 It only returns my XAML definitions, not my new vNext Build Definitions.
它只返回我的XAML定义,而不是我的新vNext构建定义。
Do I need to use a different function to do this? 我需要使用不同的功能来执行此操作吗?
Want to get the list of my changesets in the last build since the last good build. 想要获得自上一次良好构建以来最后一次构建中的变更集列表。
Previously I would have done something like the following: 以前我会做类似以下的事情:
$workspace = $buildDef.Workspace.Mappings[0].ServerItem
and then passed this $workspace
into the QueryHistory
function. 然后将此
$workspace
传递给QueryHistory
函数。
The XAML build system (and basically everything else in the "old" TFS object model) uses a SOAP API. XAML构建系统(以及“旧”TFS对象模型中的其他所有内容)都使用SOAP API。 The SOAP API is slowly being replaced with a REST API, at least for newer things.
SOAP API正逐渐被REST API取代,至少对于新的东西而言。
Thus, the task-based build system does not have a SOAP API. 因此,基于任务的构建系统没有SOAP API。 It has a REST API.
它有一个REST API。 You can access it from C# code either by querying the REST API directly or by using the Team Foundation Server Client NuGet package .
您可以通过直接查询REST API或使用Team Foundation Server Client NuGet包从C#代码访问它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.