First a little context. When you call Html.RenderPartial you send the View name, that view will be searched at locations specified by RazorViewEngine.PartialViewLocationFormats:
Html.RenderPartial("Post", item);
When you set the Layout property at Razor page, you can´t just say the name, you need to specify the path. How can I just specify the name?
//Layout = "_Layout.cshtml";
Layout = "_Layout"; //Dont work
I need this because I overrided the RazorViewEngine.MasterLocationFormats.
Currently I am specifying the Master at controller:
return View("Index", "_Layout", model);
This works, but I prefer to do this at View.