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

Jeff picture Jeff · Feb 21, 2012 · Viewed 19.3k times · Source

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.

Answer

Socardo picture Socardo · Mar 17, 2012

In Global.asax.cs

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