Im aware about bundling feature, But Im saying they are not loaded as I checked through Firebug.
Also, I get Error in my custom script code for that plugin as not loaded . So I commented my custom sript than run the proj , it runs without any error But plugin not loaded . Even my path are correct . So how can I debug the problem .
I've noticed the same problem! NOTE: jquery, jqueryui, jqueryval, and modernize all work as expected, its just Kendo refuses to work; only thing unique I've noticed is that Kendo is using .min.js source files...
If you remove the ".min" from the .css & .js file names themselves (in the Content & Scripts folders as well as on the bundles.add statements) it works as expect.
I would expect this to just work, not requiring implement either of the above workarounds. It should be smart enough to go there is only a .min file, so it will use that in both debug & release modes. It worked in the RC after all!
This is a really bad bug/oversight on Microsoft's part. If I explicitely add a .min file, it should be included. Also, if there is no non-minified file, it should be included. Making things a bit too automatic was a very poor choice here. Where should I
file a bug?
4pawan
Member
63 Points
57 Posts
Bundling feature in MVC4
Aug 17, 2012 08:31 AM|LINK
Hi,
I m using Bundling feature in my MVC 4 application. I have integrated KendoUI for same. My code is
// Bundle.config file bundles.Add(new StyleBundle("~/Content/KendoStyles/css").Include( "~/Content/KendoStyles/kendo.common.min.css" , "~/Content/KendoStyles/kendo.default.min.css")); bundles.Add(new ScriptBundle("~/Scripts/kendo/js").Include( "~/Scripts/kendo/js/kendo.all.min.js", "~/Scripts/kendo/js/kendo.web.min.js", "~/Scripts/kendo/js/kendo.aspnetmvc.min.js")); // LayOut.cshtml @System.Web.Optimization.Scripts.Render("~/Scripts/kendo/js")I get No Error , still The scripts are not loaded . EVen they are not showing in FirBug.
Kindly assist me where I m going wrong .
Thanks,
Pawan
GorillaMann
Member
117 Points
332 Posts
Re: Bundling feature in MVC4
Aug 17, 2012 08:44 AM|LINK
They are there but they are bundled into a single script or css file.
CPrakash82
All-Star
18286 Points
2842 Posts
Re: Bundling feature in MVC4
Aug 17, 2012 12:33 PM|LINK
Go through the tutorials here to understand about Bundling.
http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification
4pawan
Member
63 Points
57 Posts
Re: Bundling feature in MVC4
Aug 17, 2012 06:28 PM|LINK
Hi,
Im aware about bundling feature, But Im saying they are not loaded as I checked through Firebug.
Also, I get Error in my custom script code for that plugin as not loaded . So I commented my custom sript than run the proj , it runs without any error But plugin not loaded . Even my path are correct . So how can I debug the problem .
Kindly assist me where im goin wrong .
Thanks,
Pawan
GorillaMann
Member
117 Points
332 Posts
Re: Bundling feature in MVC4
Aug 18, 2012 10:30 PM|LINK
please paste a screenshot of firebugs trace
4pawan
Member
63 Points
57 Posts
Re: Bundling feature in MVC4
Aug 19, 2012 05:52 AM|LINK
Hi,
I have attached the screenshots for same .
http://www.flickr.com/photos/55961659@N05/7812985294/in/photostream // FireBugTrace
http://www.flickr.com/photos/55961659@N05/7812985734/in/photostream // Hierarchy Js
http://www.flickr.com/photos/55961659@N05/7812985596/in/photostream // bundleConfig.cs
http://www.flickr.com/photos/55961659@N05/7812985466/in/photostream // Calling in LayOut.cshtml
Please go through same and let me know if im goning wrong somewhere .
Thanks,
Pawan
Jay_Harlow
Member
86 Points
26 Posts
Re: Bundling feature in MVC4
Aug 19, 2012 05:35 PM|LINK
I've noticed the same problem! NOTE: jquery, jqueryui, jqueryval, and modernize all work as expected, its just Kendo refuses to work; only thing unique I've noticed is that Kendo is using .min.js source files...
If you turn off debug in web.config:
it works as expected.
If you remove the ".min" from the .css & .js file names themselves (in the Content & Scripts folders as well as on the bundles.add statements) it works as expect.
I would expect this to just work, not requiring implement either of the above workarounds. It should be smart enough to go there is only a .min file, so it will use that in both debug & release modes. It worked in the RC after all!
Jay
Jay_Harlow
Member
86 Points
26 Posts
Re: Bundling feature in MVC4
Aug 20, 2012 03:43 PM|LINK
Found a possible solution:
http://www.kendoui.com/forums/mvc/general-discussions/vs2012-rtm-mvc4-kendo-bundle-not-rendering.aspx
http://stackoverflow.com/questions/11980458/mvc4-bundler-not-including-min-files
.min.js & .min.css are on the IgnoreList by default, the above solution entails removing these entries from the IgnoreList.
Hope this helps
Jay
Nairb
Member
90 Points
110 Posts
Re: Bundling feature in MVC4
Aug 23, 2012 06:55 PM|LINK
This is a really bad bug/oversight on Microsoft's part. If I explicitely add a .min file, it should be included. Also, if there is no non-minified file, it should be included. Making things a bit too automatic was a very poor choice here. Where should I file a bug?
hdierking
Member
19 Points
3 Posts
Re: Bundling feature in MVC4
Sep 25, 2012 08:57 PM|LINK
You're correct - this is a bug and is being tracked at http://aspnetoptimization.codeplex.com/workitem/32