TFS API InformationNodeConverters.GetAssociatedChangesets() 未按预期工作

发布于 2024-10-26 05:37:55 字数 931 浏览 1 评论 0原文

我想我可能误解了这个函数的目的,但这是我的问题。

当我查看构建摘要时,我看到构建成功运行,它告诉我:

[person] triggered [build number] ([project]) for changeset 123456

我有以下代码,它在控制台应用程序中运行,告诉我构建中包含哪些变更集。

IBuildDefinition[] result = buildServer.QueryBuildDefinitions(teamProj.Name);
foreach (IBuildDefinition def in result)
{
    IBuildDetail[] dets = def.QueryBuilds();

    foreach (IBuildDetail det in dets)
    {
        det.RefreshAllDetails();

        // Get changesets for the buildList<IChangesetSummary> 
       changes = InformationNodeConverters.GetAssociatedChangesets(buildDetail);
       foreach (IChangesetSummary changeset in changes)
       {

       }
    }
}

问题是这不会返回任何结果。信息属性有 6 个节点,其中没有一个与变更集或工作项相关。为什么 VS2010 构建摘要告诉我我有一个关联的变更集,但下面的代码告诉我不同​​?

I think I may have misunderstood the purpose of this function, but here's my problem.

When I look in the build summary, I see that a build ran successfully, and it tells me:

[person] triggered [build number] ([project]) for changeset 123456

I have the following code, which runs in a console app to tell me what changesets were included in a build.

IBuildDefinition[] result = buildServer.QueryBuildDefinitions(teamProj.Name);
foreach (IBuildDefinition def in result)
{
    IBuildDetail[] dets = def.QueryBuilds();

    foreach (IBuildDetail det in dets)
    {
        det.RefreshAllDetails();

        // Get changesets for the buildList<IChangesetSummary> 
       changes = InformationNodeConverters.GetAssociatedChangesets(buildDetail);
       foreach (IChangesetSummary changeset in changes)
       {

       }
    }
}

The problem is that this returns nothing. The Information propery has 6 nodes, none of which relate to a changeset or a workitem. Why does VS2010 build summary tell me that I have an associated changeset, but the code below tells me different?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久光 2024-11-02 05:37:56

构建的状态如何? (成功、失败或部分成功)?另外,您使用哪个构建过程模板?您是否使用默认的构建过程模板?如果是,您是否对其进行了任何更新?如果您自定义构建以获得AssociateChangesetsAndWorkItems 构建活动以正常工作。

我在这里帮助 Andy Lewis 提供了一些信息:http://blogs.msdn.com/b/andy-lewis/archive/2011/01/31/how-good-was-that-build.aspx

您的字符串提到的实际上并不表明存在关联的变更集。在构建摘要屏幕上,您应该看到一个显示“关联变更集”的部分。如果不这样做,那么这通常是存在问题的第一个迹象。

请告诉我们一些其他信息,我将很乐意为您提供帮助!

What is the state of the build? (Successful, Failed, or Partially Succeeded)? Also, which build process template are you using? Are you using the default build process template and if you are have you made any updates to it? There are a few things that you have to make sure you keep in place if you customize the build to get the AssociateChangesetsAndWorkItems build activity to work properly.

I helped Andy Lewis with some of that information here: http://blogs.msdn.com/b/andy-lewis/archive/2011/01/31/how-good-was-that-build.aspx

The string you mentioned isn't actually what indicates that there are associated changesets. On the build summary screen, you should see a section that says "Associated Changesets." If you don't, then that usually is the first sign that there is a problem.

Let us know some additional information and I'll be happy to help!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文