Starting debugging with VS 2013.2RTM Pro, MVC 5.1 application.
If compilation mode is set to debug = "true", it is assumed that it disables merging and minimization, but this is not the case. When I examine the view source on the page, styles and scripts are included.
<script src="/bundles/modernizr?v=K-FFpFNtIXjnmlQamnX3qHX_A5r984M2xbAgcuEm38iv41"></script>
If I set BundleTable.EnableOptimizations = false; in BundleConfig.cs, it disables merging and minimization, but thatβs not how it should work. I should not forget to switch the setting of EnableOptimizations !
Everything works correctly in VS 2012 MVC 4 applications.
Is this a MVC 5.1 bug? Who else has this problem? Is there a way to get debugging information in order to disable combining and minimization?
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 the title
@Styles.Render("~/Content/css") @Styles.Render("~/Content/themes/base/css") @Scripts.Render("~/bundles/modernizr")
At the end of the body
@Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/jqueryval")
source share