how to debug Minification failed. Returning unminified contents

user636525 picture user636525 · Jan 10, 2014 · Viewed 21.5k times · Source

I am using Asp.net MVC 4 bundler to bundle and minify my Css files.

YSlow is showing this error below

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

This is my bundle code,

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

Now how will i find out which css file is causing the problem ? How can i debug to find the line that is causing the problem ? site.css is the only css file that i wrote.

Answer

Carlos Martinez T picture Carlos Martinez T · Feb 27, 2014

In case someone is still dealing with problems like this.

In the example above: (1442,26) 1442 is the line number and 26 is the character offset. HOWEVER, for this to be exact, you need remove the whole comment where this error is indicated:

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