Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set up your .NET development tree? [closed]

How do you set up your .NET development tree? I use a structure like this:

-projectname
--config (where I put the configuration files)
--doc    (where I put all the document concerning the project: e-mails, documentation)
--tools  (all the tools I use: Nunit, Moq)
--lib    (all the libraries used by the solution: ninject or autofac)
--src
---app   (sourcefiles)
---test  (unittests)
solutionfile.sln
build.csproj

The sign "-" marks directories.

I think it's very important to have a good structure on this stuff. You should be able to get the source code from the source control system and then build the solution without opening Visual Studio or installing any third party libraries.

Any thoughts on this?

like image 984
Fossmo Avatar asked Sep 16 '08 12:09

Fossmo


4 Answers

We use a very similar layout as covered in JP Boodhoo's blog post titled Directory Structure For Projects.

like image 107
BigJump Avatar answered Oct 22 '22 17:10

BigJump


Check out these other StackOverflow questions...

  • Structure of Projects in Version Control
  • Best Practice: Collaborative Environment, Bin Directory, SVN
like image 24
Steven Murawski Avatar answered Oct 22 '22 16:10

Steven Murawski


TreeSurgeon is a tool that will set up a directory tree for you, with all the required dependencies and a skeleton nant file. At that link, you can also find a series of blog posts by its original creator, Mike Roberts, explaining some of the deliberate choices behind the structure that TreeSurgeon gives you, e.g. why it's OK to have duplication between lib and tools, why it's important to have all dependencies present etc.

I haven't used it in a while so can't remember if I still agree with all the choices it makes, but I don't think you can go far wrong with it.

like image 2
Alex Scordellis Avatar answered Oct 22 '22 16:10

Alex Scordellis


We use a structure like this:

  • CompanyNameOrCoreProjectName
    • Branch
      • BranchName
        • CopyOfTrunk
    • Trunk
      • Desktop
      • ReferencedAssemblies
      • Shared
      • Solutions
      • Test
      • Webs

Then just make sure that all project/solution files only use relative paths and branching works well. Desktop/Webs are for projects of the respective types, Test is for any unit test projects, Solutions folder has a folder for each solution with only the solution file in it. ReferencedAssemblies holds all of the assemblies that we don't include in the solution (these are sometimes local projects that we just don't want to build every time we build the solution or third party assemblies like rhinomocks or log4net, etc. Shared is for any of the core libraries (data access, business logic, etc) that are used across several solutions.

like image 1
Chris Shaffer Avatar answered Oct 22 '22 16:10

Chris Shaffer