微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

asp.net-mvc – 如何调试Minification失败 返回未最终内容

我使用Asp.net MVC 4 bundler来捆绑和缩小我的Css文件

YSlow在下面显示错误

/* Minification Failed. Returning unminified contents.
    (1442,26): run-time error CSS1019: Unexpected token,found ':'
    (1442,26): run-time error CSS1042: Expected function,26): run-time error CSS1062: Expected semicolon or closing curly-brace,found ':'
     */

这是我的捆绑代码

bundles.Add(new StyleBundle("~/Content/css").Include(
        "~/Content/site.css","~/Content/fullcalendar.css","~/Content/jquery.dropdown.css","~/Content/jquery.tagit.css","~/Content/tipsy.css"
        ));

现在我怎么知道哪个css文件导致了这个问题?我如何调试找到导致问题的行? site.css是我写的唯一的css文件

解决方法

如果有人仍在处理这样的问题。

在上面的例子中:(1442,26)1442是行号,26是字符偏移量。然而,为了确切地说,您需要删除指出此错误的整个注释:

/* Minification Failed. Returning unminified contents.
    (1442,found ':'
     */

原文地址:https://www.jb51.cc/aspnet/252387.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐