我调用 IBuildServer.QueryBuilds(),并查看返回IBuildDetail
的 s:
- TFS2010:它们填充了用户别名。
- TFS2012:它们为空。
如何获取 TFS2012 中的用户名?
var collection = new TfsTeamProjectCollection(new Uri(_txtCollection.Text));
var buildServer = collection.GetService<IBuildServer>();
var spec = buildServer.CreateBuildDetailSpec(Settings.Default.ProjectName);
spec.QueryOptions = QueryOptions.Definitions;
spec.QueryOrder = BuildQueryOrder.StartTimeDescending;
spec.InformationTypes = null;
return buildServer.QueryBuilds(spec).Builds;