Search code examples
asp.net-corerazor-pages

Orders of .cshtml and .cs file in Asp.net Razor Pages changed, what to do?


The orders of my .cshtml and .cs file in the solution explorer of visual studio have been changed. Previously there were first a .cshtml file and an arrow before it which when I clicked on it, the expended .cs file appeared in the next level. But now this order has been changed and the arrow is before .cs file and not allow expansion and those files are in one level (not two, as they were before). See it in the following picture:

enter image description here


Solution

  • Check if File Nesting option is enabled in solution explorer enter image description here