Reputation: 7551
so all of a sudden my asp mvc 4 bundles stop working:(
I get cancelled as my http status for the bundle URL's.
Any ideas what I do next? I'm using the same virtual paths in my _layout as when it was working
@Styles.Render("~/foundation/stylesheets")
@Scripts.Render("~/foundation/javascripts")
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
//JQUERY STUFF
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-1.*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryplugins").Include(
"~/Scripts/plugins/jquery.placeholder.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui*"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery.ui.core.css",
"~/Content/themes/base/jquery.ui.resizable.css",
"~/Content/themes/base/jquery.ui.selectable.css",
"~/Content/themes/base/jquery.ui.accordion.css",
"~/Content/themes/base/jquery.ui.autocomplete.css",
"~/Content/themes/base/jquery.ui.button.css",
"~/Content/themes/base/jquery.ui.dialog.css",
"~/Content/themes/base/jquery.ui.slider.css",
"~/Content/themes/base/jquery.ui.tabs.css",
"~/Content/themes/base/jquery.ui.datepicker.css",
"~/Content/themes/base/jquery.ui.progressbar.css",
"~/Content/themes/base/jquery.ui.theme.css"));
//FOUNDATION STUFF
bundles.Add(new ScriptBundle("~/foundation/javascripts").Include(
"~/foundation/javascripts/app.js",
"~/foundation/javascripts/foundation.min.js",
"~/foundation/javascripts/modernizr.foundation.js"));
bundles.Add(new StyleBundle("~/foundation/stylesheets").Include(
"~/foundation/stylesheets/app.css",
"~/foundation/stylesheets/foundation*"));
}
}
Upvotes: 2
Views: 2142
Reputation: 414
I had the same issue and after days of trying to figure it out I noticed my jquery version is now 2.x and my bundles are referencing jquery-1.*. I did have problems when updating my site using NuGet last time. I think the crash caused my bundles to get updated, but it did not update my references in code. Hopefully this will save someone days from trying to figure out why it happened to them.
This is what my app generated for me when I created it:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include("~/Scripts/jquery-1.*"));
Upvotes: 2
Reputation: 8169
This can happen if your bundle path is the same as an actual path. For example, you have your css in /Content/Css
and your build your bundle with the same path thus:
bundles.Add(new StyleBundle("~/Content/Css").Include(
"~/Content/Css/normalize.css",
"~/Content/Css/main.css"
));
Upvotes: 11
Reputation: 15593
Don't try to minify a '.min' file. Remove the .min file from the bundle and use the development file.
Upvotes: 2
Reputation: 1900
if ALL of the are being cancelled, it sounds like your routing tables are screwed up. Check them out with http://nuget.org/packages/routedebugger
Upvotes: 2