Is it possible to use a layout from another assembly? I spitted up my application in different layers and have a separated UI layer which contains the master layout for the designers to edit.
Is it possible and what I what would my reference looks like?
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
You may take a look at the following article which illustrates a technique allowing you to have Razor views embedded into a separate assembly.
At the end by the time you run the website, you need to gather all the views including layouts to a known place.
In this case you can copy the shared views under root
<siteroot>/Views/Shared/
With this assumption you can refer these layouts the way you are doing. However visual studio or tools like resharper keep showing this as an error. You need to get comfortable with those errors.