MVC 5 @Scripts.Render(“~/bundles/bootstrap”) error ‘Object reference not set to an instance of an object.’

Try changing “new ScriptBundle” to “new Bundle” in your “RegisterBundles” within BundleConfig:

bundles.Add(new Bundle("~/bundles/bootstrap").Include("~/Scripts/bootstrap.js"));

Leave a Comment