在_Layout模版中使用@Styles.Render()没有效果

刚才有测试一个功能,就是在_Layout母版中使用了@Styles.Render()时行Render样式文件,所有在此母版下的视图均没有应用到样式,没有效果。
是什么原因?


经查证资料,原来Insus.NET在Global.asax文档中,配置了BundleTable.EnableOptimizations = true;

 

当设为true之后,脚本/风格渲染方法优化为关闭。

我们需要设置为:
BundleTable.EnableOptimizations = false;

一切正常!


原文地址:https://www.cnblogs.com/insus/p/5306458.html