Structuring Visual Studio solutions

The entire solution will be under a root folder, that may differ depending on the developer’s preferences, the branch they’re checking out etc.

Branch structure

Folder Name Function Comments
Main Trunk / main branch  
BranchesDevelopment Contains development branches  
BranchesReleases Contains live, maintenance branches  
General Non branch-specific resources E.g. Build server configuration, general documentation etc

Solution structure

Folder Name Function Comments
Bin Build drop location Drop location for binaries, making it easy to get to, and easy to reference from projects in separate solutions.
Code Contains all projects Groups the code together instead of cluttering the root folder.
Commons Contains shared project resources and non code Contains things such as build scripts, documentation, shared include files, strong name key, versioning scripts etc.
CommonsLibraries Flat directory of binary libraries Contains managed and native assemblies referenced by any of the projects. Flat structure so that it’s easy to add references for, and use as a Reference Path.
TestsUnitTests Contains Unit Test projects Tests that can and should be run regularly when developing, and added to increasingly through approaches such as TDD.
TestsIntegrationTests Integration tests Integration tests that may require environment setup or more time, and won’t be run regularly during coding sessions, most regularly by continuous integration server.
TestsHarnesses Test Harnesses Test harnesses to be used manually to test functions.
<Solution>.sln Solution File The solution file exists in the root, where it’s easily accessible and can reach any and all contained folders and files.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>