开发者

TFS API InformationNodeConverters.GetAssociatedChangesets() not working as expected

开发者 https://www.devze.com 2023-02-19 14:30 出处:网络
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:

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 t开发者_运维问答his 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?


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消