.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
9.20.2006

 
TFS and Team Build Fun
I'm getting acquainted with TFS and Team Build for the first time. The first couple issues I've noticed, which brought up questions (and sometimes answers):

Where are the labels in the history?
bharry's WebLog : Why TFS labels aren't like SourceSafe labels
Finding the changes between 2 labels in TFS

Why is Team Build labeling AFTER the GetLatest step?
Here is an explanation of the labeling system. Basically the labeling system much more elaborate in TFS than in VSS (see above). You can label based on Latest Version, Changeset, Date, Label (why label based on another label?), and most importantly, Workspace Version. The latter labels the tree in TFS based on the collection of files that you have in your workspace! This means that during a Team Build, the latest files are retrieved from TFS, then those files are labeled. We tried a test here at work and proved that a check-in after the GET but BEFORE the label is NOT included in the label. We were unable to verify this ourselves by looking at the Label task in TeamBuild, but the assumption here is that the default for the label task is to label by "Workspace Version".

Does branching work any better in TFS than in VSS?
Preliminary accounts say yes. In VSS, branching gets hosed up because there is a tendency to share/link files across projects. In TFS, you can't share files. I tried a branch this afternoon and it worked great. You can branch based on the same things you can label on (Changeset, date, label, latest version, workspace version). You create the branch in the location of your choice. The real question is: how is the support for merging a branch back into the main line?

How do you build a specific label?
Override CoreGet task and use one or more Get commands. examples here.

How can I build solutions from / share code across multiple Team Projects?
The layout for this is much like I've done at a recent client. You have dependent/common assemblies in a separate team project. Those have a post-build step to copy their output to known/fixed directory. Referencing projects refer to this common code by their known / fixed directory relative to their location.

If the fixed references location is in another TFS project, you have to adjust the Team Build project file to get more than just the TFS project for the solution you're building. Here is a post that shows how to override the BeforeGet task.

Team Project with Shared Code


Where are all the default task elements (from the import file)?
\msbuild\Microsoft\VisualStudio\v8.0\TeamBuild

How do you "undo checkout" for another user?
use tf lock ... from command line. examples here.
tf status /user:* /server:tfs.myserver.com $/SomeProject/SomeFile.cs

How do you find files checked out by any user?
tf status /recursive /workspace:* /format:detailed /server:tfs.myserver.com $/SomeProject/SomeFile.cs

How do you pass login credentials on the command line?
... /login:user,password (login can contain domain\user)

More general Team System info at Vertigo's Team System blog. (we have actually partnered with these guys a few times on some projects)

Team Foundation Server FAQ

MSBuild Tutorials and Resources
  • Web Deployment Projects and MSBuild
  • Customizing msbuild
  • Reference, team blog, hands-on-lab
  • msbuildtasks home (suite of custom tasks, including IIS appPool mgmt, NDoc, NUnit, SqlServer exec, VSS support, xml/xslt, zip)
  • MSBuild wiki on Channel9





Comments: Post a Comment

Powered by Blogger