I am working on a small mvc project, i have declared a bundle in BundleConfig.cs like this
//javascript bundle
bundles.Add(new ScriptBundle("~/bundles/Layout1JS").Include(
"~/Content/Public/js/jquery.min.js",
"~/Content/Public/js/bootstrap.min.js",
"~/Content/Public/js/jquery.isotope.min.js",
"~/Content/Public/js/jquery.Photo.js",
"~/Content/Public/js/easing.js",
"~/Content/Public/js/jquery.lazyload.js",
"~/Content/Public/js/jquery.ui.totop.js",
"~/Content/Public/js/nav.js",
"~/Content/Public/js/sender.js",
"~/Content/Public/js/jquery.slider-min.js",
"~/Content/Public/js/custom.js"));
//css bundle
bundles.Add(new StyleBundle("~/Content/Public/css").Include(
"~/Content/Public/css/main.css"));
In my _Layout.cshml in the head section i have entered:
<head>
<meta charset="utf-8">
<title>test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- LOAD CSS FILES -->
@Styles.Render("~/Content/Public/css", "~/Content/css")
<!-- LOAD JS FILES -->
@Scripts.Render("~/bundles/Layout1JS")
</head>
In my application_start i have:
BundleTable.EnableOptimizations = true;
and web.config
<compilation debug="true" targetFramework="4.0">
This gave me bit of a headache trying to figure why the bundling isnt working specially for the javascript. Some one please advise