MVC5 Object reference not set to an instance of an object on Scripts.Render
I misused ViewBag
in master layout file to consume in other pages. My structure made ViewBag
as a required field so I had to instantiate it before. But I forgot to instantiate it which caused to fire such this error and it seems to be irrelevant to Scripts.Render
.