Here are my bundels:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Bootstrap/assets/js/jquery.js"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Bootstrap/assets/js/bootstrap-transition.js",
"~/Bootstrap/assets/js/bootstrap-alert.js",
"~/Bootstrap/assets/js/bootstrap-modal.js",
"~/Bootstrap/assets/js/bootstrap-dropdown.js",
"~/Bootstrap/assets/js/bootstrap-scrollspy.js",
"~/Bootstrap/assets/js/bootstrap-tab.js",
"~/Bootstrap/assets/js/bootstrap-tooltip.js",
"~/Bootstrap/assets/js/bootstrap-popover.js",
"~/Bootstrap/assets/js/bootstrap-button.js",
"~/Bootstrap/assets/js/bootstrap-collapse.js",
"~/Bootstrap/assets/js/bootstrap-carousel.js",
"~/Bootstrap/assets/js/bootstrap-typeahead.js",
"~/Bootstrap/assets/js/bootstrap-affix.js",
"~/Bootstrap/assets/js/application.js",
"~/Bootstrap/assets/js/bootstrap.js"
));
}
And here is part of the content from my _Layout page:
@Scripts.Render("~/bundles/bootstrap")
...
When I try running this application I get js error that looks something like this
An Error has occurred in the script on this page
Object Expected
URL http://servername/AppName/bundles/bootstrap?v=asdjisdjsincdjijadosJISJDIS_idosd
A similar question was asked here: Why is my CSS bundling not working with a bin deployed MVC4 app?
I tried adding this configuration to my web.config file as suggested in question that I referenced
<modules runAllManagedModulesForAllRequests="true">
<remove name="BundleModule" />
<add name="BundleModule" type="System.Web.Optimization.BundleModule" />
</modules>
and I am still getting the same error.
If something is not clear please let me know and I will elaborate. Thanks