Running in debug from VS 2013.2RTM Pro, MVC 5.1 app.
If the compilation mode is set to debug="true" it is supposed to disable Bundling and minification but it does not. When I examine the View source on a page the styles and scripts are bundled.
<script src="/bundles/modernizr?v=K-FFpFNtIXjnmlQamnX3qHX_A5r984M2xbAgcuEm38iv41"></script>
If I set BundleTable.EnableOptimizations = false;
in the BundleConfig.cs it does disable Bundling and minification but that is not how it is supposed to work. I shouldn't have to remember to toggle the EnableOptimizations
setting!
Things are working properly in VS 2012 MVC 4 apps.
Is this a MVC 5.1 bug? Has anyone else had this problem? Is there a way to get debug to disable the Bundling and minification?
web.config:
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" useFullyQualifiedRedirectUrl="true" maxRequestLength="100000" enableVersionHeader="false" />
<sessionState cookieName="My_SessionId" />
<httpModules>
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
</httpModules>
</system.web>
_Layout.cshtml:
In header
@Styles.Render("~/Content/css") @Styles.Render("~/Content/themes/base/css")
@Scripts.Render("~/bundles/modernizr")
At end of body
@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval")