ScriptBundle says Object reference not set to an instance of an object

2.9k Views Asked by At

In the Asp.Net MVC BundleConfig if i use ScriptBundle it shows below error for this code:

Code:

bundles.Add(new ScriptBundle("~/node/GobiJs").Include(
            "~/node_modules/...../test.js"
        ));

Error:

enter image description here

But if i use Bundle instead of ScriptBundle like

bundles.Add(new Bundle("~/node/GobiJs").Include(
                "~/node_modules/...../test.js"
            ));

it works fine. Can anybody tell me what's the wrong with ScriptBundle, why it is not working?

0

There are 0 best solutions below