Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6131465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:58:43+00:00 2026-05-23T16:58:43+00:00

In order to retrieve the information which Changeset was included in which Build, we

  • 0

In order to retrieve the information which Changeset was included in which Build, we use “Label Sidekick” of Team Foundation Sidekicks, where we place the Label of the Build & expect to find the newly built Changeset.

Our development process in TFS 2010 is making use of ‘Gated’ checkins, so we are faced with the situation that the latest checkins are not presented in Sidekicks (we actually receive the changeset of the previous build). This is explainable, since at the time the labeling takes place, the latest changes have not yet been committed.

The BuildLog does report the associated Changeset correctly.

I ‘ve made several experiments in our Build Process Template but can’t seem to get what we need.
Placing, for example, the Labeling activity out of the “Run On Agent” scope, lead me to a build that fails at the very start with an “Object reference not set to an instance of an object.” (I suppose this is related with fact I had to widen the scope for ‘Label’ & ‘Workspace’ variables to get the second part running).
The ‘before’ state of the build process template for this attempt is here (this works), the ‘after’ state (“Object ref not set..”) is here.

So, to summarize, two different types of input could help me out:

How should I change our build process template so that the labeling happens after the Gated checkins have been committed? (– This would rationalize the display in Sidekicks)

or

How can I programmatically retrieve the associated Changeset of each Build? (– This would enable me to write a small app that could obsolete the Sidekicks angle)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:58:43+00:00Added an answer on May 23, 2026 at 4:58 pm

    You can use the TFS API to get this done.

            public static void GetBuild()
        {
            var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://tfsdevlonuk:8080/tfs/gazprom.mt"), new UICredentialsProvider());
            tfs.EnsureAuthenticated();
            var buildServer = tfs.GetService<IBuildServer>();
    
            // Get Project Name
            var versionControl = tfs.GetService<VersionControlServer>();
            var teamProjects = versionControl.GetAllTeamProjects(true);
    
            // Get Builds for a team project
            var buildDetails = buildServer.QueryBuilds(teamProjects[0].Name);
    
            // For each build
            foreach (IBuildDetail buildDetail in buildDetails)
            {
                // Get the build details
                var buildInfor = buildDetail.Information;
    
                // More build infor like shelveset, etc
                Debug.Write(buildDetail.LabelName + buildDetail.ShelvesetName);
    
            }
    

    The above code will help you get the build details programatically. I have some blog posts on how to connect to tfs programmatically and use the tfs api. http://geekswithblogs.net/TarunArora/archive/2011/06/18/tfs-2010-sdk-connecting-to-tfs-2010-programmaticallyndashpart-1.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I use Windows Vista's FOLDERID API in order to retrieve filepaths for
I would like to retrieve the categories of my website in order to build
I have generic list which must be a preserved order so I can retrieve
I have a 3-leveled hierarchy of entities: Customer-Order-Line, which I would like to retrieve
I'am developing an application for android, which needs network in order to retrieve some
I'm building an Iphone application, which has to retrieve information from a database on
Is it possible to retrieve items from a Python dictionary in the order that
In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary
Hello I've currently got a program which retrieves WMI information and stores it to
I have table in my SQL Server database called OrderDetail which stores the order

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.