How to use Rider File Nesting


Many fequent readers to this blog, will know that I predominantly use Jetbrains IDE’s for most of my development and for C# .net core I use Rider. One of the cool features in Rider that I like to use is the File Nesting which helps me to keep my project explorer view organised.


File Nesting is also available in Visual Studio File nesting in Solution Explorer

What is File Nesting

File Nesting helps keep related files together to help organise them and make them easier to locate. For example, as in my API End points project file you want to keep all files that relate to implementing a Specific end point together with the end point they are connected with.

To activate the File Nesting in rider simply click the cog icon in the top right hand side of your project explorer tab

When the COntext Menu Opens simply select File Nesting Settings… which will open a dialog similar too

Which will enable you to define your own custom File Nesting settings which as I have highlighted I have started doing. Typically what I tend to do is create a File nesting rule for all the HTTP Verbs used in REST API’s

  • Get
  • Post
  • Put
  • Patch
  • Delete

This is because REST APIs enable you to develop any kind of web application having all possible CRUD (create, retrieve, update, delete) operations. REST guidelines suggest using a specific HTTP method on a particular type of call made to the server .

For my Get usually use the following rule.

Plain Text
For my Post, Put, Patch & Delete I define 
Plain Text
Latest posts by Gary Woodfine (see all)