views:

30

answers:

3

I am adding my code to source control (SVN). I am trying to organize my projects and solutions to fit with the SVN best practise. I obviously don't want to add junk and stuff that changes for every user. What exactly does the MyProject folder contain. This seems to be something that Visual Studio creates and maintains. It seems to contain assembly and reference information. I assume that this should be under version control. I have looked at other question but no one has mentioned the MyProject folder.

Last Thing. I have two projects in my solution. One for the code and one for the unit tests. This creates a bit of a weird structure and naming problem for SVN. SVN best practise suggests

repo
|- Project
    |-trunk
    |-branches
    |-tags

Which leaves me with

repo
|- Project X
    |- trunk
        |- Project X
        |- Unit Tests
    |-branches
    |-tags

Now I have project X repeated in the repo structure. Not a train smash but it feels untidy. Is there a way to reconcile visual studio solution/project layout with the SVN repo layout. Should I just rather try to rename the either the project in visual studio or rename the lower Project X to source?

Or should I just live with it? Any suggestion would be most welcome.

A: 

You can still put the project in.

As long as you filter out all the user settings with the svn:ignore property

nolim1t
A: 

Regarding your last question about the structure: I think it's fine that "Project X" is repeated in the structure. The first instance (above trunk, branches and tags) is the project name in a general manner - it doesn't necessarily have to be the name of your Visual Studio solution.

Under trunk you will have all the Visual Studio projects that are part of your solution. In a small project it might look like your example, but as the complexity increases you will probably split your codebase into several VS projects.

Example:

repo
|- Blog
   |- trunk
      |- Blog.Web
      |- Blog.DomainModel
      |- Blog.Tests
   |- branches
   |- tags
Anders Fjeldstad
A: 

The My Project folder definitely should be under version control.

From SVN's standpoint, your "project folder" should be the parent folder that contains My Project, along with bin, obj, your .sln file, etc.

This parent folder should also have svn:ignore set to the following:

bin
obj
*.user
*.suo

Furthermore, this "project folder" should be what goes into your trunk, branches, and tags directories.

Michael Hackner