I wonder why my js file work when I call it in the view:
@section Scripts {
I'm having the same problem. In my Layout.cshtml file I have @RenderSection("Scripts", required: false) at the bottom before my closing body tag.
In my index.cshtml I have
@section Scripts{
}
But it's not working. It was working fine on the homepage before I implemented the shared layout file. Would like to have a better understanding of whats going on here...