Kevin Steffer Outloud – web, business and opinions

12Oct/093

Best Practice Visual Studio with SVN, VCS and SCM

In my research on what others have of opinions and experience with subversion (SVN) or source control management (SCM) I have collected some good links of various kind – slide shows, red book and just experiences or ideas.

My focus on my research was dealing with Web development and specially ASP.NET development with Visual Studio along with third party CMS software.

The major pain is Visual Studio, when you open up your solution and don’t touch anything your “Solution.suo” file gets modified and with SVN you have a modified state of your project folder and you need to take action either commit the change or revert the file.

My conclusion on ASP.NET development with Visual Studio is

Add the following to your ignore list:

  • Solution\Project\bin
  • Solution\Project\obj
  • Solution\Solution.suo (hidden file)

Have your repository layout like this:

  • Project
    • branches
    • tags
    • trunk

Use the trunk for your “main-line”-development. With “main-line” I think of primary development that always stable and never has checked-in code that doesn’t build.

Use your branches for creating testing, experiments and development of larger features that should not break the trunk, but needs to be committed often for backup and history of file changes. Keep your branch in sync with the trunk, remember to regularly merge changes from trunk into your branch, this prevents you from “drifting” to far away from the trunk and that makes it much easier to merge your branch back into the trunk when time comes for that.

Use your tags for creating snapshots of your trunk or branch that goes into releases and is thought of as test solutions or the LIVE beasts that hits the production servers.

If you have questions, suggestions I’d very much like to hear from you and your experience with the subject – thanks in advance.

Subversion Best Practices Links

http://www.slideshare.net/mza/subversion-best-practices
http://electricjellyfish.net/garrett/talks/oscon2004/svn-best-practices/
http://svn.collab.net/repos/svn/trunk/doc/user/svn-best-practices.html
http://www.red-bean.com/fitz/presentations/2006-06-28-AC-EU-Subversion-best-practices.pdf
http://devnulled.com/content/2006/10/guide-and-best-practices-for-subversion-branching/
http://nedbatchelder.com/text/quicksvnbranch.html
http://daptivate.com/archive/2008/08/28/subversion-best-practices-for-web-applications.aspx

Filed under: ASP.NET, CMS, Web 3 Comments