JustLearning JustLearning - 1 year ago 62
ASP.NET (C#) Question

Asp css bundling and minification not woring

I have setup my css bundling and minification as follows:

bundles.Add(new StyleBundle("~/styles").Include(
BundleTable.EnableOptimizations = true;


<%: System.Web.Optimization.Styles.Render("~/styles") %>

My debug is set to true.

So the above
files are never minified and bundled all i get on the client is a response of the actual
page.(From the console:


I cannot figure out with it is not working.

The funny thing is that the
is being bundle correctly and minified

Any ideas?

Answer Source

Okay i got it to work, don't really understand why it is working. So my css is in a Content folder, I thought virtual directory can be anything thus i used the styles virtual directory. However, once i used ~/Content/css as virtual directory it worked

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download