ASP.NET web forms BundleTable is still bundling in debug mode

coldabhishek

New Member
I've got an ASP.NET web forms application, running on .NET 4.5 using the new Bundling and Minification features from the Microsoft.AspNet.Web.Optimization package.So far it's a very simple setup just with a single bundle.BundleConfig.cs\[code\]public static void RegisterBundles(BundleCollection bundles){ bundles.Add(new ScriptBundle("~/bundles/send").Include( "~/scripts/GrowingInput.js", "~/scripts/textboxlist/TextboxList.js", "~/scripts/textboxlist/TextboxList.Livesearch.js", "~/scripts/combobox/ui.combobox.js", "~/scripts/jquery-ui-timepicker.js", "~/scripts/msp.send.js"));}\[/code\]Global.asax\[code\]protected void Application_Start(object sender, EventArgs e){ BundleConfig.RegisterBundles(BundleTable.Bundles);}\[/code\]Send.aspx\[code\]<%: Scripts.Render("/bundles/send") %>\[/code\]This is always rendered in a web browser as \[code\]<script src="http://stackoverflow.com/bundles/send"></script>\[/code\] ignoring whether debug is set to true or false in web.config. I've tried adding \[code\]BundleTable.EnableOptimizations = false;\[/code\] to BundleConfig.cs to force bundling off but this makes no difference.Looking to get the following working like it does in MVC sites (Microsoft documentation seems to suggest web forms should be the same).[*]Get bundling to turn on/off with the debug flag[*]Append the cache-busting ?v=xxx querystring for versioning.
 
Back
Top