I created a default internet (and tried intranet -- same problem) MVC 4 files in VS 2012 Ultimate Release 3, on Windows 7 64. I then set the release mode to Release instead of Debug, and ran the application.
In IE 9, I right-clicked and selected view source, and the jquery file being used is the same one as in debug mode (not the .min version):
<script src="/Scripts/jquery-1.8.2.js"></script>
Is there something else I'm supposed to do to enable the automatic use of .min version of the script files when in Release mode? I also tried modifying the code to check if debug was defined (#if DEBUG) and it isn't.
Note that I tested this with the default applications created from the templates that come with MVC 4. I didn't change them at all (I ran into the problem in my own application originally and wanted to see if it was something I'd done).
The web configs are the default ones. The release one is:
<!-- For more information on using Web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an atrribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your Web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>
Thanks, -D