I'm baffled. I have spent well over 8 hours on this. I have built the Bootstrap project, the default ASP.Net project, The default MVC 4 project. They bundle and work. I cannot get it into my live project (MVC 4). In the page source, it is pointing at a bundle, but the bundle does not seem to exist. I have forced it to bundle in the debug environment using BundleTable.EnableOptimizations = true in Global.asax.cs. I have also published it to the local host as a release to work this out. It doesn't seem like anyone else has encountered this problem. I have removed wild cards. I have verified all files exist.
This is BundleConfig.cs
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/css/trap.css",
"~/Content/themes/base/css/calendar.css",
"~/Content/themes/base/css/calendar_green.css",
"~/Content/themes/base/css/jquery-ui.css",
"~/Content/themes/base/css/reset.css",
"~/Content/themes/base/css/tables.css",
"~/Content/themes/base/css/media.css"
));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/css/css1.css"
));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-2.6.2.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.9.1.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui.js"));
bundles.Add(new ScriptBundle("~/bundles/indexjs").Include(
"~/Scripts/customform.js",
"~/Scripts/main.js",
"~/Scripts/calendar.js",
"~/Scripts/index.js"));
These are in _Layout.cshtml
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/themes/base/css")
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
}
}
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/indexjs")
This is what is in the page:
<link href="/Content/themes/base/css?v=7SpkiWgU-0qwm8o4vYF5hDEB6L_DnS5xvUSEa1JLYW81" rel="stylesheet"/>
<link href="/Content/css?v=fh8XEHnJaCFRna_3Cjrz3hjgz5VDfBkXTaNJ1ign4pk1" rel="stylesheet"/>
<script src="/bundles/jquery?v=UmEFuwJBr5PmaadGOBwoWrIxakg6oVbTduk0Gdne4ko1"></script>
<script src="/bundles/jqueryui?v=u5Tft1k7a-ZOfnV1Fz5TM1T_Rv33WbgFF-rZ8VWBtX01"></script>
<script src="/bundles/indexjs?v=1ATJu4VPSoZ_HPVcPlj-Te73BaXgxachLoR5Vxg0te81"></script>
I am baffled. I am open to any suggestion. It just does not work.