It is definitely possible, I think you just missed something.
I myself tested this using the viewing mechanism you provided (copied and pasted verbatim). I do not see the same behavior as you. I have two _ViewStart.cshtml , one on ~/Framework/Views/_ViewStart.cshtml and one on ~/Views/_ViewStart.cshtml .
When I run the view in ~/Framework/Views/ , it uses _ViewStart.cshtml in the Framework folder. When I run the view in ~/Views/ , it uses _ViewStart.cshtml in the ~/Views/ folder.
Double-checking the code in RazorViewEngine with DotPeek also confirms that this is exactly how it should behave. The viewer starts checking for a file named _ViewStart.cshtml in the same folder as the rendered view, and then rises to the directory tree until it reaches the root of the application.
user22467
source share