RCL stands for Razor class library.
I made my own prototype RCL with a Shared file _Layout.cshtml and I want to include it in my project. I already installed the RCL from NuGet hoping it would automagically work, but it apparently doesn't.
I deleted my _Layout.cshtml, hoping it would get taken from the RCL I made, but apparently that won't work like that. I get the following errors:
An unhandled exception occurred while processing the request.
InvalidOperationException: The layout view '_Layout' could not be located. The following locations were searched:
/Pages/_Layout.cshtml
/Pages/Shared/_Layout.cshtml
/Views/Shared/_Layout.cshtml
Microsoft.AspNetCore.Mvc.Razor.RazorView.GetLayoutPage(ViewContext context, string executingFilePath, string layoutPath)
- How do I properly import this RCL into my new web app?
Update
I added @using libnamehere to my _ViewImports.cshtml file and commented out the only line of code in _ViewStart.cshtml but now I get the following errors:
InvalidOperationException: RenderBody has not been called for the page at '/Pages/Shared/_Layout.cshtml'. To ignore call IgnoreBody().
Microsoft.AspNetCore.Mvc.Razor.RazorPage.EnsureRenderedBodyOrSections()

