views:

145

answers:

2
+2  Q: 

.Net sln structure

I have been working on variety of projects at my work. I am thinking to organize all the projects within solutions in the following tree structure:

 [Common Libraries]     -- virtual and real folder
    project1
    project2
    ....                -- projects or folders
 [Application Group1]
    [Application1]
       project1         -- console application as example
       projectLib1      -- project library for project1
       [dependency libraries1]
          projectLib1_1  -- dependency project for upper projectLib1
  ....

Basically, the top folder contains all the common libraries and its dependency projects. Virtual folders (real folder as well) are used as a way to group projects and sub-groups. In this way, projects can only see or reference projects in the same level and upper level.

Any comments or other alternative way to organize projects?

A: 

I prefer to put every project in its own folder off the root SVN trunk and then separately organize the solutions in VS as you described.

Allen
+1  A: 

You can reference projects which are lower down but you cannot add them in Visual Studio.

Seems a little odd to me but I've found that you can do it but you need to edit the path in the sln file.

Bit fiddly but it works.

My personal favorite way to oganising source is:

- Vendor
-- Product
--- Version

so for example

-Microsoft
--Enterprise Library
---3.1
---4.0
--Style Cop
---4.3
-Apache
--Log4net
---1.2.10
---1.2.1

etc

that way you will never have dulplication of Dlls and your code will fit under your company and product, with each release being a version.

Saint Gerbil