SharePoint projects are some what special in the way they use assemblies and some time it is very difficult to setup your TFS build process for continuous integration. Today, SharePoint Developer Team has published an excellent step-by-step process to properly setup your TFS Build Process for SharePoint Projects. You can read the article here
This article guides about the following:
- How to configure the build server to properly compile the SharePoint projects?
- List of necessary SharePoint assemblies to make sure compilation succeeds.
- How to update Powershell script to add the required files on Build server?
- Steps to create build definition.
- How to setup build workflow?
I would highly recommend you to read this article before embarking on your next SharePoint project.