The last line in the body element of my _Layout.cshtml is:
@RenderSection("Scripts", required: false)
Yet when I run my app, I get the exception:
The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml": "Scripts".
Strange enough right, because Scripts is not required. Then, in my login page, I comment out the following line:
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
And the app runs fine. Is this somehow because the jqueryval bundle is empty, so the view engine thinks that the Scripts section is not being rendered in _Layout.cshtml? My BundleConfig includes the script in question, and it is present in my Scripts folder, so what could be wrong?