TFS 2013自定义构建过程 - 检查以前的构建

时间:2014-05-15 09:52:39

标签: tfs visual-studio-2013 tfs2013

在TFS 2012中,我能够使用基于this的XAML来自定义我们的工作流程,以将当前版本中的警告数量与之前的版本进行比较。 (我在其他地方看到类似的代码来检查代码覆盖率是否已经下降等)。

在TFS 2013中,似乎无法从以前的版本中检索结果,因为BuildDetail类型不再可见。具体来说,我收到以下错误:

The build process failed validation. Details: Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.Build.Client.InformationNodeConverters.GetBuildWarnings(BuildDetail).Count". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "BuildDetail.BuildServer.GetBuild(BuildDetail.BuildDefinition.LastGoodBuildUri)". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. 

在TFS 2013中,是否有办法访问TFS 2012中提供的BuildDetail.BuildServer.GetBuild以前版本的详细信息?我在网上找不到任何使用旧方法的样本。

2 个答案:

答案 0 :(得分:1)

TFS产品团队大大简化了构建,因为90%的人不会自定义或想要在PowerShell中完成一些简单的自定义。如果你想拥有BuildDetail,你可以使用" GetBuildDetail"构建中包含的活动。

答案 1 :(得分:0)

经过进一步调查后,事实证明TFS Build Extensions提供了GetLastGoodBuild活动,这似乎可以满足我的需求。