为什么在asp.net 4.0中捆绑和缩小之后不会发生缩小 [英] why minification not happenting after bundling and minification in asp.net 4.0
本文介绍了为什么在asp.net 4.0中捆绑和缩小之后不会发生缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨伙计们,
我正在我的应用程序中实现捆绑和缩小。
我能够合并资源。但我不看到任何缩小都应用于捆绑文件夹。它没有清除js / css文件中的注释而没有优化文件的内容。
请分享您的想法。
Hi folks,
I am implementing bundling and minification in my application.
I am able to combine resource.But I dont see any minification is applied to bundled folder.It is not clearing the comments in js/css files and not optimizing the content of the files.
Please share your thoughts on this.
推荐答案
如果您正在从VS调试您的应用程序,它将不会在调试模式下发生。
你可以通过添加BundleTable.EnableOptimizations = true来启用它;在RegisterBundles方法中(App_Start文件夹中的BundleConfig类)
http://www.asp.net/mvc/overview/performance/bundling-and-minification [ ^ ]
If you are debugging your application from VS it will not happen in debug mode.
You can enable this by adding BundleTable.EnableOptimizations = true; in your RegisterBundles method (BundleConfig class in the App_Start folder)
http://www.asp.net/mvc/overview/performance/bundling-and-minification[^]
这篇关于为什么在asp.net 4.0中捆绑和缩小之后不会发生缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文