Bundling and minification is enabled or disabled by setting the value of the debug attribute in the compilation Element in the Web.config file. In the following XML, debug is set to true so bundling and minification is disabled.To enable bundling and minification, set the debug value to "false". You can override the Web.config setting with the EnableOptimizations property on the BundleTable class. BundleTable.EnableOptimizations = true;
Don’t add js & css directly by using html tags, follow below mention steps:- Script Html.AppendScriptParts("~/Content/js/myscript.js"); CSS Html.AppendCssFileParts("~/Content/css/mycss.css");