views:

928

answers:

3

Background: We have a TFS server setup where me manage our source code and track work items and bugs. We also have CC.Net setup to help us do CI (mostly just build and run unit tests). We use .net framework 3.5 and VS 2008

I am familiar with MSBuild and use it in our current project to accomplish many pre-deployment and deployment tasks. However, I am not sure of the purpose of TFSBuild. I think it is used at the TFS Server level to do build tasks. But I cannot find good documentation as to whether and how I (as a developer, not an administrator of our TFS...developers only have read access to the TFS Server) can use TFS Build to make my deployment/CI tasks easier. Can using TFSBuild make my task easier/ more efficient when i am already using MSBuild for my build process and CC.Net is already running the set of unit tests that we have? Is TFSBuild an alternative to CC.Net? What about integration of TFSBuild with Visual Studio 2008?

Update: How does 'TeamBuild' fit into this stack. More than the theory, a simple example that puts these things together would be really helpful. Right now, we just do two things: use MSBuild to do deployment tasks (update config file, version info, publish app to remote server) and then CC.Net takes over. Where can i fit TeamBuild/TFSbuild into this picture. And more importantly, do I need that? I understand that everyone has different requirements, but can it generally help? One good reason i got from one of the answers for using TFS build was to create TFS tickets automatically in some conditions. What are some things like that which you guys usually do?

+1  A: 

MSBuild vs TFSBuild

MSBuild is the technology that is used for the actual builds. The 'Builds' node in Team Explorer is an XML file that inputs basic parameters that will be inputed in MSBuild. When you add a Build in this node it will actually add some files to your source control tree. These are the files that are connected to MSBuild that you would customize.

You can automate your builds very easily. There is a command line tool called tfsbuild, this should be located in the %Program Files%\Microsoft Visual Studio 8\Common7\IDE folder. You specify a TFS Server, a Team Project, and a Build Type (the name that you created in the 'Builds' node). Use this command line utility and use the Task Scheduler within windows to call this (Program Files -> Accessories -> System Tools -> Schedule Tasks).

Source: MSDN Forums

Jonathan Sampson
+4  A: 

TFS uses same MSBuild 3.5 under the hood for automatic builds that Visual Studio 2008 uses locally. TFS defines its own build sequence by supplying MSBuild with a .proj file that imports TFS-specific targets and enriches the build sequence of the solution with the features useful in the Team environment (i.e. get latest version from source control, do the build, create TFS ticket if build fails etc.)

Here's my attempt at making sense of all these build frameworks by providing historical perspective: (my guesses and assumptions may be invalid but should still be useful conceptual info for noobs). Checkout the last section called "TFS-related MSBuild concepts" -- it has some useful links.

zvolkov
+1  A: 

Please see the article Team Build 2008 by Brian A. Randell.

Also, please see the resources in Learn Team System and Team Foundation Server and the Team System Developer Center.

There are a lot of resources out there, including resources for beginners.

John Saunders