Search code examples
javascriptcssasp.net-mvc-4minifyasp.net-optimization

How to disable Javascript/CSS minification in ASP.NET MVC 4 Beta


I am just trying out ASP.NET MVC 4 but I can't figure out how to disable Javascript/CSS minification feature. Especially for development environment this will help greatly on debugging. I would imagine it would be a switch in web.config but since ASP.NET MVC 4 is still in beta stage at the moment there's really not much information out there. Would appreciate if someone can help or point to the right blog posts etc.


Solution

  • In Global.asax.cs

    #if DEBUG
            foreach (var bundle in BundleTable.Bundles)
            {
                bundle.Transform = new NoTransform();
            }
    #endif