I'm trying to bundle my css/js-files in my webforms project but it's not working.
This is what I've done:
Included System.Web.Optimization via NuGet
Added the code below to global.asax.cs in Application_Start
BundleTable.Bundles.Add(new ScriptBundle("~/bundle/js").Include("~/js/mainJS.js")); BundleTable.Bundles.Add(new ScriptBundle("~/bundle/css").Include("~/css/mainStyle.min.css"));Added this to my masterpage
<%: Scripts.Render("~/js/mainJS.js") %> <%: Styles.Render("~/css/mainStyle.min.css") %>
It renders the references to the css/js-files so the page is working but it's not generating a unique file name and it's not refering to the bundle folder like I expected.
I'm using VS2013 and Framework 4.0.
<compilation debug="false" />in your web.config (this is independent from building in release mode)?