I want to be able to minimize / merge javascript files in a production environment, while having them unminified / unfundled when debugging locally; however, the default WebForms site in VS2012 does not seem to allow it.
Steps to reproduce my problem:
- Create a new ASP.NET Web Forms application (C # in my case)
- Start without debugging and viewing resources in a browser
- Note the unminified jquery / modernizr files, but bundled with / minified
MsAjaxJS and WebFormsJs
web.config by default has:
<compilation debug="true" targetFramework="4.5">
And I even tried to modify Global.asax, explicitly telling BundleTable not to optimize:
void Application_Start(object sender, EventArgs e) {
However, I still get undebuggable javascript files:

This site (which I understand for MVC) tells me that either debug="true" in web.config or BundleTable.EnableOptimizations = false; in Global.asax should disable functionality. And this site (which is linked to the first for WebForms) does not mention disabling it for debugging.
How can I (purely) tell my project to only minimize / stratify when debug = "false"?
(I am using ASP.NET 4.5)
EDIT:
This question and this question are similar, but both of them only offer a solution using Scripts.Render() . Is there a way to do this using the template method using ScriptManager?
source share