I have this section defined in my _Layout.cshtml
@RenderSection(\"Scripts\", false)
I can easily use it from a view:
I had this issue today. I'll add a workaround that uses as I didn't see the other answers mention it.
//on a JS file somewhere (i.e partial-view-caller.js)
(() => )();
//in your Partial View
//you can actually just straight call your partial view script living in an external file - I just prefer having an initialization method :)
Code above is an excerpt from a quick post I made about this question.