views:

194

answers:

3

Hi all,

We're working simultaneously on SharePoint sites. We've to move them on a source control system. We've got both VSS and TFS. We'll prefer TFS over VSS because of its reliability. I don't have any idea how to bind a SharePoint site with TFS? The reason it is a bit confused with SharePoint site is not all dependencies are in there in the site it could have Layouts, Features etc. and they are deploy outside the site folder. How could you manage the separate pieces of a SharePoint site through a version controller (or TFS)?

Thanks.

A: 

This is one of the problems with SharePoint development. We don't keep any 'content' in source control, all that goes in there is the code, including everything we add to _layouts. Content (everything that is in a content database) still is an integral part of 'the solution'. We use the versioning that is built into SharePoint for that and the integration server contains the source copy for all to get copies from. Content doesn't deploy the same way as code so it is not included in builds.

In some projects this may be possible using exports and imports or backups; every developer checks in an export of the site that the solution uses and this can be restored on the other development environments. This won't allow merging and overwrites the developers own content.

ArjanP
+2  A: 

Content is posted directly to production using the browser - you can use site collection backups to rehydrate staging and development servers with latest content from production.

Deployable solutions, features, etc., are pushed out in the opposite direction: from development to staging to production.

This is the way SharePoint is designed: content and code flow in opposite directions to each other. Use TFS to store your code only.

IrishChieftain
+1  A: 

ArjanP and IrishChieftan are correct about the separation of code and artifacts. It is supposed to be possible to move artifacts into TFS but it is not reccommended. I am researching similar issues around SharePoint and TFS and found these articles very helpful:

Team-Based Development in Microsoft Office SharePoint Server 2007

http://msdn.microsoft.com/en-us/library/bb428899.aspx

How do we do SharePoint development, including TFS integration? (MCS Finland Team)

http://blogs.msdn.com/vesku/archive/2009/10/25/how-do-we-do-sharepoint-development-including-tfs-integration.aspx

Hope this helps.

Junx