Skip to content

Organise your solution to accord with our conventions

You SHOULD organise your solution according to our standards. They follow those used by many language ecosystems, including the .NET source code itself. Note that they differ from the typical Visual Studio File New defaults.

There are two choices, as shown below. This document describes the first, which suits a Behavioural Driven Development [BDD] approach. But they are very similar and equally valid.

Organizing your software solution - option #1 (suits a BDD approach):

Examples of good practice

    └──{RootFolderName}/        # Root folder for your entire software solution
        ├── deploy/             # Any infrastructure provisioning scripts
        ├── build/              # Any published build outputs
           └── scripts/        # Build scripts and CI scripts not required in the root
        ├── examples/           # Samples and demos on how to build or consume your app
        ├── specs/              # Container folder for tests and documentation
           ├── docs/           # Diagrams, specifications and documentation
           └── test/           # Automated tests and feature files
        ├── src/                # Source code separated by dependency layer subfolders
        ├── README.md           # Starting point for anyone building or using your software
        ├── .editorconfig       # Enforces a consistent coding style for your project
        └── {SolutionName}.sln  # Solution file

Organizing your software project - option #2:

Examples of good practice

    └──{RootFolderName}/        # Root folder for your entire software solution
        ├── deploy/             # Any infrastructure provisioning scripts
        ├── build/              # Any published build outputs
           └── scripts/        # Build scripts and CI scripts not required in the root
        ├── docs/               # Diagrams, specifications and documentation
        ├── examples/           # Samples and demos on how to build or consume your app
        ├── src/                # Source code separated by dependency layer subfolders
        ├── test/               # Automated tests
        ├── README.md           # Starting point for anyone building or using your software
        ├── .editorconfig       # Enforces a consistent coding style for your project
        └── {SolutionName}.sln  # Solution file

An Example .Net Solution which follows our conventions:

{IMAGE PLACEHOLDER}

Practical tips

  • Use the approach that best matches your needs

  • In later versions of .NET use C:\> dotnet new gitignore to generate a .gitignore file

  • Clone our example project structure from the Software Development Standards project in Azure DevOps.