7

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?

7 Answers 7

1

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.

1
  • We do exactly the same thing with solution-sized project groups. We also have some smaller single-project items (such as common libraries). it's a TTB per project for these (solution file can be included in the project directory for singles if desired).
    – VanSkalen
    Sep 25, 2008 at 20:17
1

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.

0

If your TTB are common rather than per project, there is no problem with it. Or am I missing something?

0

You can look at this previous post or this project. The project creates a .NET development tree structure (requires .NET 3.5).

0

When dealing with multiple projects that makes up a Visual Studio Solution it is difficult to decide how to structure things properly.

One critical aspect that you will need to do with your structure is make it easy to retrieve all the files for a particular release. It is important to make this as easy as possible. In subversion copying a root folder over to the tag branches is easier then remembering to repeat the same operation for X projects.

Being able to work for extended periods outside of the main trunk is also important. You will have to consider that as well.

You may find that your software has a number of components that naturally group together. You could do something like this

/tag

/core_library
   /branch
   /main

/business_logic
  /branch
  /main

/report_library
  /branch
  /main

/my_ui
  /branch
  /main

There is no easy answer. What you do really depends on your specific project. If everything is still coming out a snarled mess then perhaps you need to look at how your project is designed and see if that can be changed to improve understanding.

0

For bigger projects we usually use this format here:

/Project
    /trunk
       /lib/              # Binary imports here (not in svn)

       /src               # Solution file here
          /Libraries      # Library assemblies here
             /StackOverflowIsAwesome.Common

          /Products       # Delivered products here
             /StackOverflowIsAwesome.Site

          /Projects       # internal assemblies here
             /StackOverflowIsAwesome.Tests
    /branches
        /1.x
    /tags
        /StackOverflowIsAwesome-1.0

Depending on the actual project non source files (documents, etc.) have a directory under the trunk root and extra development resources are under src.

Independent projects under are under their own /Project root, but in the same repository.

-1

I do it this way:

  1. Create the project in VS
  2. Import everything in the project folder to repos/projectname/trunk
  3. Add the repos/branches and repos/tags folders

That gives me a repository structure like:

projectname
    / trunk
        /bin
        /obj
        /Properties
        projectname.sln
    /tags
    /branches

And I can just leave all of the files in their default places in the file system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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