次の方法で共有


Updated Path to tf.exe for TFS 2010 Builds

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

  • Anonymous
    May 05, 2010
    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.

  • Anonymous
    May 05, 2010
    @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) ;-)

  • Anonymous
    July 13, 2010
    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

  • Anonymous
    May 12, 2011
    Work for me using $(VS100COMNTOOLS)..IDEtf.exe without quotes  and also with two additional quotes: ""$(VS100COMNTOOLS)..IDEtf.exe""

  • Anonymous
    June 28, 2011
    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.