Technology Toolbox

Your technology Sherpa for the Microsoft platform

Jeremy Jameson - Founder and Principal

Search

Search

Updated Path to tf.exe for TFS 2010 Builds

Note
This post originally appeared on my MSDN blog:

Since I no longer work for Microsoft, I have copied it here in case that blog ever goes away.

After upgrading my Team Foundation Server (TFS) 2008 environment to TFS 2010, I found that I needed to tweak my TfsBuild.proj file in order to successfully build on my new TFS 2010 build server.

In a previous post, I detailed the process that I recommend for incrementing the assembly version with each build, in which I explained how to add a property so that we can use the TFS command-line utility to checkout the assembly version files and subsequently check them back in:

  <PropertyGroup>
    <TeamFoundationVersionControlTool>&quot;$(TeamBuildRefPath)\..\tf.exe&quot;</TeamFoundationVersionControlTool>
  </PropertyGroup>

While this worked great on a TFS 2008 build server, the path to the TFS command-line utility has changed for a TFS 2010 build server.

To use the same technique on a TFS 2010 build server, specify the following instead:

  <PropertyGroup>
    <TeamFoundationVersionControlTool>&quot;$(VS100COMNTOOLS)..\IDE\tf.exe&quot;</TeamFoundationVersionControlTool>
  </PropertyGroup>

Comments

  1. # re: Updated Path to tf.exe for TFS 2010 Builds

    May 5, 2010 8:11 AM
    Allen Feinberg

    A blog post detailing how to incrementing the assembly version with each build using the custom TFS 2010 build activities sure would be nice.

    It's complicated trying to move from TFS 2008 to TFS 2010 and the builds are the most tricky.

    Would love to see more posting on taking things that worked in TFS 2008 and creating them using TFS 2010's features.

  2. # re: Updated Path to tf.exe for TFS 2010 Builds

    May 5, 2010 8:25 AM
    Jeremy Jameson
    Gravatar

    @Allen, have you seen Jim Lamb's post on creating a custom workflow activity in TFS 2010 for assembly versioning?

    http://blogs.msdn.com/jimlamb/archive/2010/02/12/How-to-Create-a-Custom-Workflow-Activity-for-TFS-Build-2010.aspx

    It's a completely different approach to versioning your assemblies, but it does show what you can do with the new WF features in TFS 2010.

    To be honest, I'm not sure how soon I'll "upgrade" the process I use for incrementing the assembly versions. While I certainly need to learn more about customizing TFS with workflows, there's a ton of other new stuff that I consider -- at least for now -- a little higher on my priority list (e.g. diving really deep into SharePoint Server 2010) ;-)

  3. # re: Updated Path to tf.exe for TFS 2010 Builds

    July 13, 2010 8:09 PM
    Rafik

    Jeremy, when I followed your suggestion to replace $(TeamBuildRefPath) with $(VS100COMNTOOLS) in a TFSbuild.proj file after upgrading to TFS 2010, the variable evaluated to to a blank string. Any ideas why $(VS100COMNTOOLS) would not evaluate correctly in my case ?

    Thanks

    Rafik

  4. # re: Updated Path to tf.exe for TFS 2010 Builds

    May 13, 2011 4:11 AM
    BENDERDOUR

    Work for me using $(VS100COMNTOOLS)..\IDE\tf.exe without quotes  and also with two additional quotes:

    ""$(VS100COMNTOOLS)..\IDE\tf.exe""

  5. # re: Updated Path to tf.exe for TFS 2010 Builds

    June 28, 2011 1:27 PM
    Peter

    You sir are my hero today. This is the second blog post I've found from you fixing problems we're having when moving our build agent to a 64-bit server.

Add Comment

Optional, but recommended (especially if you have a Gravatar). Note that your email address will not appear with your comment.
If URL is specified, it will be included as a link with your name.

To prevent spam from being submitted, please select the following fruit: Strawberry

Watermelon
Cherries
Pear
Grapes
Strawberry
Apple
 
Please add 2 and 7 and type the answer here: