If I understand correctly it is intended to specify which locations are searched in order to locate the master _Layout.cshtml
file.
However my _ViewStart.cshtml
file requires a full path, e.g. ~/Views/Shared/_Layout.cshtml
. This means that any location(s) specified in MasterLocationFormats
are totally ignored.
My Questions Are:
- Why bother including
MasterLocationForamts[]
in the first place? - Is there another use for
MasterLocationFormats[]
that I'm missing? - Is there a way to make
_ViewStart.cshtml
search in the locations specified inMasterLocationFormats[]
?
I have tried using a relative path like _Layout.cshtml
in _ViewStart.cshtml
but that didn't work)
I've googled around this and while it must be explained somewhere, I am unable to find it. I asked a similar question a while back and though I appreciate the person answering, it didn't really address the crux of my confusion.