Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How do you do version/source control in SharePoint Visual Studio projects (I'm using 2010)? Can it be connected to SVN, for example? I'm new to SharePoint.

share|improve this question
3  
Are you talking about source control of Visual Studio projects? If so, it's the same as it would be for any other kind of project. –  Rob Windsor Jul 7 '11 at 12:47
    
I guess it's web parts and other customized elements in Sharepoint that would be in SVN. –  Alex C Jul 7 '11 at 14:00
1  
Wow - so many answer when we've no idea if he's really asking about SVN/Visual Studio (as most assumed) or what - why not wait for clarification quick shooters ;) –  Ryan Jul 7 '11 at 15:01
    
As pointed out, the question as written didn't have all the details required. The OP has said they're new to SP so probably don't know about SP dev. If they don't agree with the community's assumption of Visual Studio projects then they can/should edit the question for clarification. –  Alex Angas Jul 7 '11 at 23:38
    
Sorry for not being clear. Actually, the varied answers helped clarify where and how you'd use SVN. From what I've gathered, it's for Visual Studio code you'd write that will be used in SharePoint. Very helpful answers. Thanks, everyone, for your input and great answers :) It's much appreciated in helping this newbie! –  Alex C Jul 10 '11 at 5:11
add comment

4 Answers 4

up vote 3 down vote accepted

Since SharePoint projects (code for customizations) can be seen as 'normal' coding project at some point, you can use a versioning system like SVN. I'd go for a combination of VisualSVN and TortoiseSVN as other suggest if you want to stick with SVN.

However for SharePoint development (more than regular .NET development) I prefer to go with TFS instead of SVN, since it's a smoother experience in my opinion. If you're in a decent .NET development company, they possibly have a TFS server set up already, or at least have access to it through their MSDN account (and TFS2010 is a walk in the park to set up).

If you're talking about version control of pages that you change on the SharePoint site itself (or on documents), that's taken care of SharePoint. No need for source control there. Only be sure to back up the databases.

share|improve this answer
1  
We are also using TFS, it's doesn't what type of project you are working on! And I also like how it integrate with our Microsoft oriented ecosystem. –  Gabriel Mongeon Jul 7 '11 at 23:45
add comment

SVN is simply source control for files - an example of this would be TortoiseSVN (http://tortoisesvn.tigris.org/). You would create your customisations for SharePoint using Visual Studio and then check these files into source control. You would not normally add any of the SharePoint files or databases into source control - only the customisations you create using Visual Studio.

Also be aware when using VisualSVN with VS2010 and SPI's (SharePoint Project Items) - we have seen issues where some items are not added by default to source control and you need to add these manually.

share|improve this answer
add comment

We use SVN for our SharePoint 2010 project, basically we just structure the code as normal and then check it in to SVN, just like any other code. Nothing special really required. We use Tortoise as the client although you could use a Visual Studio plug-in to make things easier.

share|improve this answer
    
Thanks, Michael. I'm new to Sharepoint and SVN, so forgive my newbie questions :) Do you add Sharepoint on the server to SVN? I'm just trying to wrap my head around this. Thanks again! –  Alex C Jul 7 '11 at 13:50
1  
No, we add the source code for what we customize into SVN. You shouldn't need to add SharePoint to SVN, kind of a waste if you have the installer. We do keep images of the VM's where we install SharePoint so we can restore as needed. –  MichaelF Jul 7 '11 at 20:39
add comment

VisualSVN is a Subversion plug in for Visual Studio.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.