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

<pre><code>-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
</code></pre>

<p>The sign "-" marks directories.</p>

<p>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. </p>

<p>Any thoughts on this?</p>

[{'answer_id': 71676, 'author': 'Steven Murawski', 'author_id': 1233, 'author_profile': 'https://Stackoverflow.com/users/1233', 'pm_score': 3, 'selected': False, 'text': '<p>Check out these other StackOverflow questions...</p>\n\n<ul>\n<li><a href="https://stackoverflow.com/questions/16829/structure-of-projects-in-version-control#16915">Structure of Projects in Version Control</a></li>\n<li><a href="https://stackoverflow.com/questions/265/best-practice-collaborative-environment-bin-directory-svn">Best Practice: Collaborative Environment, Bin Directory, SVN</a></li>\n</ul>\n'}, {'answer_id': 71678, 'author': 'BigJump', 'author_id': 8542, 'author_profile': 'https://Stackoverflow.com/users/8542', 'pm_score': 4, 'selected': True, 'text': '<p>We use a very similar layout as covered in JP Boodhoo\'s blog post titled <a href="http://blog.developwithpassion.com/2007/10/01/directory-structure-for-projects/" rel="nofollow noreferrer">Directory Structure For Projects</a>.</p>\n'}, {'answer_id': 71691, 'author': 'ARKBAN', 'author_id': 11889, 'author_profile': 'https://Stackoverflow.com/users/11889', 'pm_score': 0, 'selected': False, 'text': '<p>At my place of work we have multiple projects, where each project gets its own sub-directory, like so:\n -proj1<br>\n--proj1.csproj<br>\n-proj2<br>\n--proj2.csproj<br>\n-proj3<br>\n--proj3.csproj<br>\nsolutionfile.sln  </p>\n\n<p>The rest of your setup looks okay, but I think you should figure out how you would incorporate multiple projects, for example a shared source library between multiple solutions.</p>\n'}, {'answer_id': 71738, 'author': 'Curro', 'author_id': 10688, 'author_profile': 'https://Stackoverflow.com/users/10688', 'pm_score': 0, 'selected': False, 'text': '<p>If I understand your structure correctly, I think you are going to have many duplicates in your dev tree related to "tools" and "lib". Most likely these are external tools and libraries that might be shared by different projects.</p>\n\n<p>Something that works well for us is:<br />\n<code>\nsolutionfile.sln<br />\n-src<br />\n--projectname<br />\n---config<br />\n---doc<br />\n---source files (structure representing namespaces)<br />\n-test<br />\n--testprojectname (usually, a test project per source project)<br />\n---unit test files (structure mirroing the structure in the source project)<br />\n-lib<br />\n--libraryname (containing the libraries)<br />\n-tools<br />\n</code></p>\n'}, {'answer_id': 71741, 'author': 'hollystyles', 'author_id': 2083160, 'author_profile': 'https://Stackoverflow.com/users/2083160', 'pm_score': 0, 'selected': False, 'text': "<p>I don't have tools within the project. Tools are in a network share. Yes disk space is cheap these days but... come on :)</p>\n\n<p>Also I have a database script folder below projectname (when it's a data driven app) </p>\n\n<p>Of course it doesn't matter so much how you're set-up, but the fact that a logical organised standard is used to suit the project and adhered to with good discipline. This is useful whether you're solo or on a team. </p>\n"}, {'answer_id': 71770, 'author': 'Chris Shaffer', 'author_id': 6744, 'author_profile': 'https://Stackoverflow.com/users/6744', 'pm_score': 1, 'selected': False, 'text': "<p>We use a structure like this:</p>\n\n<ul>\n   <li>CompanyNameOrCoreProjectName\n      <ul>\n         <li>Branch\n            <ul>\n               <li>BranchName\n                  <ul>\n                     <li>CopyOfTrunk</li>\n                  </ul>\n               </li>\n            </ul>\n         </li>\n         <li>Trunk\n            <ul>\n               <li>Desktop</li>\n               <li>ReferencedAssemblies</li>\n               <li>Shared</li>\n               <li>Solutions</li>\n               <li>Test</li>\n               <li>Webs</li>\n            </ul>\n         </li>\n      </ul>\n   </li>\n</ul>\n\n<p>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.</p>\n"}, {'answer_id': 71917, 'author': 'Alex Scordellis', 'author_id': 12006, 'author_profile': 'https://Stackoverflow.com/users/12006', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://www.codeplex.com/treesurgeon" rel="nofollow noreferrer">TreeSurgeon</a> 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.</p>\n\n<p>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.</p>\n'}, {'answer_id': 72065, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>We also use TreeSurgeon and are quite happy with it. Our structure looks like:</p>\n\n<p>Branch</p>\n\n<ul>\n<li>build</li>\n<li>lib</li>\n<li>src\n\n<ul>\n<li>&lt;\nvarious src directories for apps, tests, db migrations, etc.)</li>\n</ul></li>\n<li>tools</li>\n</ul>\n\n<p>Trunk</p>\n\n<ul>\n<li>Same as above</li>\n</ul>\n'}]
['https://Stackoverflow.com/questions/71608', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4093/']