.NET Project Folders Structure

kasuken

Emanuele Bartolesi

Posted on June 24, 2022

.NET Project Folders Structure

We read very often how to have a good architecture for a .NET project, but I don't read very often how to structure the folders of the project.

You might think it's a minor problem, but it's also important to have a good folder structure and especially one that is always the same, to make it easier to find things at a glance and also to make it easier for other people to get into the project faster.

In the picture below you can see my typical structure of a project.

My project folders structure

Let's see what each item is.

  • artifacts: where the build.cmd script puts the artifacts
  • build: build customizations
  • docs: markdown files, installation instructions, help files. I use this folder to put the Docusaurus project
  • lib: if you have a custom library outside of NuGet, you can copy the files here
  • samples: sample projects to use your solution or projects
  • src: the code of your projects
  • tests: all the tests projects live here
  • .editorconfig: coding styles and other settings for your environment
  • .gitignore: I think you don't need a description about it
  • build.cmd: the script to build the project and create artifacts (I don't use it very often)
  • LICENSE: the license file of your project. Useful especially for GitHub
  • Project001.sln: the solution file of your projects
  • README.md: useful for GitHub but also to give an overview of the project to the other people involved

Out of my curiosity: do you have a fixed structure for projects like me?
Share yours in the comments!

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
kasuken
Emanuele Bartolesi

Posted on June 24, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About