What is/are the difference(s) between MSBuild and TFSBuild

Punit Vora picture Punit Vora · Jul 1, 2009 · Viewed 7.4k times · Source

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?

Answer

zvolkov picture zvolkov · Jul 1, 2009

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 (archived here) 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.