Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Structure of projects in version control - .NET specific

This post is similar to this previously asked question. I really want to set up my SVN repository in TTB format, but when creating a project in Visual Studio 2008 (ASP.NET/VB.NET), the structure created tends to be incompatible when considering the solution file, project files, folders for projects, multiple projects within solutions, etc. Does anyone have a script or procedure to take a newly created ASP.NET project and move it to a TTB format as painlessly as possible?


Let me be more specific. Suppose I have a project that I'm creating called StackOverflowIsAwesome. I can put that into my local folder structure (let's say that it's c:\working). When I create it, VS creates c:\working\StackOverflowIsAwesome and a whole bunch of subfolders (bin, app_data, etc.). But I want my repository structure to look like...

StackOverflowIsAwesome
    /trunk
        /bin
        /app_data
    /tags
    /branches

So, is there a clean way to do this consistently or do I need to resort to constantly moving/modifying files and folders to make this work?

like image 659
Dan Coates Avatar asked Sep 25 '08 20:09

Dan Coates


2 Answers

We went with a very simplistic approach:

File Structure:

  • Solution Folder (contains solution file, build scripts, maybe more?)
    • Project Folder
    • Project Folder 2
    • References (contains shared assemblies for the solution).

Then we just check the entire solution folder's contents into our repository. We use one repository for each solution. I'm not sure if this is the optimal way to organize the solution, but it works for us.

Also, we branch at the highest level, not per project.

like image 110
brock.holum Avatar answered Oct 12 '22 23:10

brock.holum


Another way:

StackOverflowIsAwesome
  /trunk
    /database
    /datafiles
    /documents
    /build
    /installer
    /lib 
        /External_DAL (external that points to shared library)
    /utilities
    /vendor
    /src
      /StackOverFlowIsAwesome
        /StackOverFlowIsAwesome.csprj
        /bin
        /...
      /StackOverFlowIsAwesomeTests
        /StackOverFlowIsAwesomeTests.csprj
        /bin
        /...
  /branches
  /tags

This would be for each project. Since we are using a build script, we don't need store our solution file in SVN.

like image 41
JKueck Avatar answered Oct 13 '22 00:10

JKueck